我尝试了很多东西,但这仍然没有用。当我尝试运行npm start
命令时,它会给我这个错误:
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v6.4.0 npm ERR! npm v3.10.6 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! angular2-quickstart@1.0.0 start: `tsc && concurrently "tsc -w" "lite-server" ` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the angular2-quickstart@1.0.0 start script 'tsc && concurrently "tsc -w" "lite-server" '. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the angular2-quickstart package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! tsc && concurrently "tsc -w" "lite-server" npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs angular2-quickstart npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls angular2-quickstart npm ERR! There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install? npm ERR! Please include the following file with any support request: npm ERR! /home/gg/Scrivania/my-proj/newangular/npm-debug.log
答案 0 :(得分:0)
也许您有一些遗漏的对等依赖项。当您使用npm版本3+时,您必须手动安装任何所需的对等依赖项。
在运行 npm install 时,您应该会看到警告消息。确保删除node_modules并重新安装,仔细检查 npm install 的输出,如下所示:
cd /home/gg/Scrivania/my-proj/newangular
rm -rf node_modules
npm install