npmERR を解決したい
laravel.mixをつかってサービス構築してますが、JSがうまく動かず、npmを再インストールしようとしたところ下記エラーに悩まされております。
一通り、検索して対処してみましたがエラーが解決できなかったため投稿させていただきます。
よろしくお願いします。
環境
macOS Catalina 10.15.3
PHP 7.3.11
Laravel Framework 5.8.35
Node v10.15.0
nodebrew 1.0.1
関係ないとは思いますが・・・
Docker version 19.03.5, build 633a0ea
エラーメッセージ
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ development 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/***********/.npm/_logs/2020-03-15T09_40_44_266Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ watch: `npm run development -- --watch "--watch-poll"` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ watch 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/***********/.npm/_logs/2020-03-15T09_40_44_305Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ watch-poll: `npm run watch -- --watch-poll` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ watch-poll 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/************/.npm/_logs/2020-03-15T09_40_44_336Z-debug.log
package.json の中身
{ "private": true, "scripts": { "dev": "npm run development", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "npm run development -- --watch", "watch-poll": "npm run watch -- --watch-poll", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", "prod": "npm run production", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.18", "bootstrap": "^4.1.0", "cross-env": "^5.1", "jquery": "^3.2", "laravel-mix": "^4.0.7", "lodash": "^4.17.5", "popper.js": "^1.12", "resolve-url-loader": "^2.3.1", "sass": "^1.15.2", "sass-loader": "^7.1.0", "vue": "^2.5.17" } }
試したこと
下記コマンドで再度実行しても同じエラーになってしまいます。
rm -rf node_modules rm package-lock.json npm cache clear --force npm install npm run dev
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。