0
2

More than 3 years have passed since last update.

【備忘録】npm run startで missing scriptエラーが出た場合の対処法

Last updated at Posted at 2021-08-27

npm run startの結果下記エラー発生。
どうやらstartのコマンドがpackage.jsonに記載がないことが原因らしいため、色々調べてみた。

エラー文

1 error generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/●●/project/●●_web_server/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/usr/local/Cellar/node/16.7.0/bin/node" "/Users/●●/project/●●_web_server/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/●●/project/●●_web_server/node_modules/node-sass
gyp ERR! node -v v16.7.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.14.1 postinstall 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/2021-08-27T00_05_44_201Z-debug.log

解決策

rm -rf node_modules
rm -f package-lock.json
npm i
npm run start

こちらの記事を参考にさせていただきました。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2