我使用命令行成功安装了npm,但是当我用来运行npm run dev
时,它显示了一些错误!
我试图替换github上提供的packages.json
的代码并重新安装npm,但仍然出现相同的错误。
npm run dev
C:\wamp64\www\shopping>npm run dev
'CALL "C:\Program Files\nodejs\\node.exe"
"C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is
not recognized as an internal or external command,operable program or batch file.
@ dev C:\wamp64\www\shopping
npm run development
npm ERR! file C:\WINDOWS\system32\cmd.exe;C:\Program Files\Java\jdk-10.0.2\bin;
npm ERR! path C:\WINDOWS\system32\cmd.exe;C:\Program Files\Java\jdk-10.0.2\bin;
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn C:\WINDOWS\system32\cmd.exe;C:\Program Files\Java\jdk-10.0.2\bin;
npm ERR! @ dev: `npm run development`
npm ERR! spawn C:\WINDOWS\system32\cmd.exe;C:\Program Files\Java\jdk-10.0.2\bin;
ENOENT
npm ERR!
npm ERR! Failed at the @ 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! C:\Users\hp\AppData\Roaming\npm-cache\_logs\2019-08-28T19_22_32_311Z-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.2.0",
"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"
}
}