npm create-nuxt-app myapp npm install axios
でNuxtアプリをcreateしてaxiosをインストールした後に、
#####nuxt.config.js
vue.js
1import pkg from './package' 2export default { 3 module: [] 4}
の状態ではlocalhost:3000でアプリが立ち上がるのですが、
moduleの部分にaxiosを入れて
#####nuxt.config.js
vue.js
1import pkg from './package' 2export default { 3 module: ['axios'] 4}
とすると
> 2_testapp@1.0.0 dev /Users/USERNAME/2_testapp > nuxt FATAL The "url" argument must be of type string. Received type undefined 18:21:32 at validateString (internal/validators.js:125:11) at Url.parse (url.js:150:3) at Proxy.urlParse (url.js:145:13) at dispatchHttpRequest (node_modules/axios/lib/adapters/http.js:57:22) at new Promise (<anonymous>) at httpAdapter (node_modules/axios/lib/adapters/http.js:18:10) at dispatchRequest (node_modules/axios/lib/core/dispatchRequest.js:59:10) ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ ✖ Nuxt Fatal Error │ │ │ │ TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received type undefined │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! 2_testapp@1.0.0 dev: `nuxt` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the 2_testapp@1.0.0 dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/USERNAME/.npm/_logs/2019-03-31T09_21_32_648Z-debug.log
といった感じのエラーが出るんですがローカルの環境が間違ってるような気もするんですが、おかしい場所の検討もつきません。
アプリケーションの開発に進めなくてとても辛いです!!誰かわかる人はぜひ教えてください!!!
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/04/18 07:26