[每当我尝试安装NPM软件包时,都会出现此错误:
'node'不被识别为内部或外部命令,可操作程序或批处理文件。
我检查了环境变量(系统和用户)。节点的路径已设置。
日志文件显示:
457 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ROBIN SYLVESTER\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "ejs"
458 verbose node v10.16.0
459 verbose npm v6.14.4
460 error code ELIFECYCLE
461 error errno 1
462 error [email protected] postinstall: `node --harmony ./postinstall.js`
462 error Exit status 1
463 error Failed at the [email protected] postinstall script.
463 error This is probably not a problem with npm. There is likely additional logging output above.
464 verbose exit [ 1, true ]
图像:
可能是因为您尚未将节点目录保存在cmd中...您需要进入窗口设置才能执行此操作...