按照我学校的指示,我试图安装“ npx create-react-app@3.3.0 nucampsite”,但是它打开了带有文件npm-cli.js
的Visual Studio代码
我尝试从Visual Studio Code运行命令,但收到此错误消息:
C:\Users\Jay\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js:1 npm/usr/bin/nodejs ^ ReferenceError: npm is not defined at Object.<anonymous> (C:\Users\Jay\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js:1:1) at Module._compile (internal/modules/cjs/loader.js:1138:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10) at Module.load (internal/modules/cjs/loader.js:986:32) at Function.Module._load (internal/modules/cjs/loader.js:879:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) at internal/main/run_main_module.js:17:47
在Visual Studio Code的第1行,这就是我所拥有的:
npm/usr/bin/nodejs
答案 0 :(得分:0)
答案 1 :(得分:0)
已修复!我卸载了node和npm,然后将其重新安装回去,它似乎运行良好!谢谢你们!