Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/468.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript ';节点';未被识别为内部或外部命令、可操作程序或批处理文件;仅当尝试启动应用程序时_Javascript_Node.js_Npm_Uglifyjs - Fatal编程技术网

Javascript ';节点';未被识别为内部或外部命令、可操作程序或批处理文件;仅当尝试启动应用程序时

Javascript ';节点';未被识别为内部或外部命令、可操作程序或批处理文件;仅当尝试启动应用程序时,javascript,node.js,npm,uglifyjs,Javascript,Node.js,Npm,Uglifyjs,因此,如果我想npm安装一个软件包或检查节点或npm版本,它可以工作,但如果我尝试用任何脚本启动应用程序,它会显示这一点。[已编辑] $ npm start > nibblin@0.0.0 start C:\Users\trevc\Desktop\Projects\nibblin > concurrently "npm run server" "npm run client" 'node' is not recognized as an internal or external

因此,如果我想npm安装一个软件包或检查节点或npm版本,它可以工作,但如果我尝试用任何脚本启动应用程序,它会显示这一点。[已编辑]

$ npm start

> nibblin@0.0.0 start C:\Users\trevc\Desktop\Projects\nibblin
> concurrently "npm run server" "npm run client"

'node' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nibblin@0.0.0 start: `concurrently "npm run server" "npm run 
client"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nibblin@0.0.0 start 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\trevc\AppData\Roaming\npm-cache\_logs\2018-08- 
05T14_06_10_006Z-debug.log
这是我的包裹

{
  "name": "nibblin",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "server": "node ./bin/www",
    "client": "npm start --prefix client",
    "start": "concurrently \"npm run server\" \"npm run client\""
  },
  "dependencies": {
    "cookie-parser": "~1.4.3",
    "debug": "~2.6.9",
    "express": "~4.16.0",
    "http-errors": "~1.6.2",
    "jade": "~1.11.0",
    "morgan": "~1.9.0",
    "concurrently": "^3.6.1"
  }
}
在删除所有节点模块并尝试重新安装之后,我面临这个问题

$ npm i
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading 
Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading 
Browserslist >3.0 config used in other tools.
npm WARN deprecated istanbul-lib-hook@1.2.1: 1.2.0 should have been a major 
version bump

> uglifyjs-webpack-plugin@0.4.6 postinstall 
C:\Users\trevc\Desktop\Projects\nibblin\client\node_modules\uglifyjs-webpack- 
plugin
> node lib/post_install.js

'node' is not recognized as an internal or external command,
operable program or batch file.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is 
installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 
(node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! uglifyjs-webpack-plugin@0.4.6 postinstall: `node 
lib/post_install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the uglifyjs-webpack-plugin@0.4.6 postinstall 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\trevc\AppData\Roaming\npm-cache\_logs\2018-08- 
05T14_50_21_506Z-debug.log

这只发生在使用create react app创建的“我的客户端”文件夹中,您正在运行的npm脚本是
node server.js
,但在您的package.json中,您将启动脚本定义为
node./bin/www

在boiler player中没有bin或www文件夹。所以我猜要么是你从另一个样板复制了一个package.json,要么是把文件结构搞砸了,要么是在错误的目录中运行了这个命令