こちらのサイトでwebpackの練習をしてたらこんなエラーが出た。描き間違いかと思ったらそうではなく何が原因かよくわからない。多分バージョンとの差異で起きたと思う。
ts_tutorial % npm start npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yosikiokada/.npm/_logs/2021-12-14T03_43_31_458Z-debug.log
2021-12-14T03_43_31_458Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using npm@6.14.14 3 info using node@v14.17.5 4 verbose stack Error: missing script: start 4 verbose stack at run (/usr/local/lib/node_modules/npm/lib/run-script.js:155:19) 4 verbose stack at /usr/local/lib/node_modules/npm/lib/run-script.js:63:5 4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:116:5 4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:436:5 4 verbose stack at checkBinReferences_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:391:45) 4 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:434:3) 4 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:161:5) 4 verbose stack at ReadFileContext.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:350:20) 4 verbose stack at ReadFileContext.callback (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:123:16) 4 verbose stack at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:282:13) 5 verbose cwd /Users/yosikiokada/ts_tutorial 6 verbose Darwin 21.1.0 7 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 8 verbose node v14.17.5 9 verbose npm v6.14.14 10 error missing script: start 11 verbose exit [ 1, true ]
2021-12-14T03_43_31_458Z-debug.log
{ "name": "ts_tutorial", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { "ts-loader": "^9.2.6", "typescript": "^4.5.4", "webpack": "^5.65.0", "webpack-cli": "^4.9.1", "webpack-dev-server": "^4.6.0" } }
package.json
あなたの回答
tips
プレビュー