いつもお世話になっております
下記のリンクを参考に、Vue.jsを使用して、ECサイトのモックアップを練習として作っているのですが、npm run devが使用できません
Vue.jsでECサイトのモックアップを作ってみる
私の現在のコード
・開発環境: MacOS Catalina v10.15.3 , npm 6.13.4 , node v12.16.1 , vue@2.6.11
・試したこと1: package-lock.jsonをみて、npm run serveが無いので、devに変えたところ、下記のようなエラーになりました
・試したこと2:> 英語のサイトを参考にnpm i -g webpack-cli --save-devをしましたが、下記2つ目のようなエラーが出てしまいます
babelの利用に関して、私の理解が至らないので、ご存に方がいましたらご助力願います
npm run devの後
Terminal
1> ec-sample-vue-cli@0.1.0 serve /Users/kazuhisanoguchi/Desktop/ECapp 2> vue-cli-service serve 3 4 ERROR Error: Cannot find module 'babel-plugin-transform-vue-jsx' from '/Users/kazuhisanoguchi/Desktop/ECapp' 5Error: Cannot find module 'babel-plugin-transform-vue-jsx' from '/Users/kazuhisanoguchi/Desktop/ECapp' 6 at Function.resolveSync [as sync] (/Users/kazuhisanoguchi/Desktop/ECapp/node_modules/resolve/lib/sync.js:81:15) 7 at resolveStandardizedName (/Users/kazuhisanoguchi/Desktop/ECapp/node_modules/@babel/core/lib/config/files/plugins.js:101:31) 8 at resolvePlugin (/Users/kazuhisanoguchi/Desktop/ECapp/node_modules/@babel/core/lib/config/files/plugins.js:54:10) 9 at loadPlugin (/Users/kazuhisanoguchi/Desktop/ECapp/node_modules/@babel/core/lib/config/files/plugins.js:62:20) 10 at createDescriptor (/Users/kazuhisanoguchi/Desktop/ECapp/node_modules/@babel/core/lib/config/config-descriptors.js:154:9) 11 at /Users/kazuhisanoguchi/Desktop/ECapp/node_modules/@babel/core/lib/config/config-descriptors.js:109:50 12 at Array.map (<anonymous>) 13 at createDescriptors (/Users/kazuhisanoguchi/Desktop/ECapp/node_modules/@babel/core/lib/config/config-descriptors.js:109:29) 14 at createPluginDescriptors (/Users/kazuhisanoguchi/Desktop/ECapp/node_modules/@babel/core/lib/config/config-descriptors.js:105:10) 15 at plugins (/Users/kazuhisanoguchi/Desktop/ECapp/node_modules/@babel/core/lib/config/config-descriptors.js:40:19) 16npm ERR! code ELIFECYCLE 17npm ERR! errno 1 18npm ERR! ec-sample-vue-cli@0.1.0 serve: `vue-cli-service serve` 19npm ERR! Exit status 1 20npm ERR! 21npm ERR! Failed at the ec-sample-vue-cli@0.1.0 serve script. 22npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 23 24npm ERR! A complete log of this run can be found in: 25npm ERR! /Users/kazuhisanoguchi/.npm/_logs/2020-02-26T16_02_20_624Z-debug.log 26kazuhisanoguchi@KazuhisanoMacBook-Air ECapp % npm run dev 27npm ERR! missing script: dev 28 29npm ERR! A complete log of this run can be found in: 30npm ERR! /Users/kazuhisanoguchi/.npm/_logs/2020-02-26T16_02_31_357Z-debug.log 31
npm i -g webpack-cli --save-devの後
Terminal
1npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules 2npm WARN webpack-cli@3.3.11 requires a peer of webpack@4.x.x but none is installed. You must install peer dependencies yourself. 3 4npm ERR! code EACCES 5npm ERR! syscall access 6npm ERR! path /usr/local/lib/node_modules 7npm ERR! errno -13 8npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' 9npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] { 10npm ERR! stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'", 11npm ERR! errno: -13, 12npm ERR! code: 'EACCES', 13npm ERR! syscall: 'access', 14npm ERR! path: '/usr/local/lib/node_modules' 15npm ERR! } 16npm ERR! 17npm ERR! The operation was rejected by your operating system. 18npm ERR! It is likely you do not have the permissions to access this file as the current user 19npm ERR! 20npm ERR! If you believe this might be a permissions issue, please double-check the 21npm ERR! permissions of the file and its containing directories, or try running 22npm ERR! the command again as root/Administrator. 23 24npm ERR! A complete log of this run can be found in: 25npm ERR! /Users/kazuhisanoguchi/.npm/_logs/2020-02-26T16_09_35_677Z-debug.log 26
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。