简体   繁体   English

在执行npm start时出现此错误

[英]Getting this error when I am doing npm start

I am totally new to this node.js!! 我对这个node.js完全陌生! How to overcome the following error . 如何克服以下错误。 Tried all possible solutions given on net. 尝试了网上给出的所有可能的解决方案。 And this error occurred after the environmental variables were changed. 并且在更改环境变量后发生了此错误。 Please do help me to solve the problem. 请帮我解决问题。 Thanks in advance. 提前致谢。

C:\project\nodetest1>npm start

> nodetest1@0.0.0 start C:\project\nodetest1
> node ./bin/www


npm ERR! nodetest1@0.0.0 start: `node ./bin/www`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the nodetest1@0.0.0 start script.
npm ERR! This is most likely a problem with the nodetest1 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./bin/www
npm ERR! You can get their info via:
npm ERR!     npm owner ls nodetest1
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! cwd C:\project\nodetest1
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! nodetest1@0.0.0 start: `node ./bin/www`
npm ERR! Exit status -1
npm ERR!
npm ERR! Failed at the nodetest1@0.0.0 start script.
npm ERR! This is most likely a problem with the nodetest1 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./bin/www
npm ERR! You can get their info via:
npm ERR!     npm owner ls nodetest1
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! cwd C:\project\nodetest1
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\project\nodetest1\npm-debug.log
npm ERR! not ok code 0

The package.json is package.json是

 {
  "name": "nodetest1",
  "version": "0.0.0",
  "private": true,
  "scripts": {
  "start": "node ./bin/www"
 },
  "dependencies": {
  "body-parser": "~1.8.1",
  "cookie-parser": "~1.3.3",
  "debug": "~2.0.0",
  "express": "~4.9.0",
  "express-session": "^1.9.3",
  "jade": "~1.6.0",
  "mongodb": "*",
  "mongoose": "^3.8.21",
  "monk": "*",
  "morgan": "~1.3.0",
  "nodemon": "*",
  "passport": "*",
  "passport-local": "*",
  "serve-favicon": "~2.1.3"
 }

} }

This error had also occurred to me also.This happens because of path variable in enviroment .Therefore just change unistall node.js and remove the path variable from system and also Npm and npm-cache from the AppData\\Roaming\\npm . 这个错误也发生在我身上,这是由于环境中的路径变量导致的,因此只需更改unistall node.js并从系统中删除路径变量,然后从AppData \\ Roaming \\ npm中删除Npm和npm-cache。 And then install node it will work for sure 然后安装节点,它将确保正常工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我在运行npm start时在ubuntu 16.04中遇到npm错误 - I am getting npm errors in ubuntu 16.04 when I run npm start 使用 UUID npm 模块出现奇怪错误。 我究竟做错了什么? - Getting strange error using UUID npm module. What am I doing wrong? 为什么我在运行时收到此错误:npm run build? - Why am I getting this error when running: npm run build? Node.js-我启动npm start时babel loader出现错误 - Nodejs - Getting Error in babel loader when i initiate npm start 我在 npm start 命令中遇到错误,我该怎么办? - I am getting an error in npm start command, what should I do? 对 React 应用程序使用“npm start 命令”时出现错误 - I am getting error while using "npm start command for React application 使用 React 应用程序启动 npm 时出错 - Getting error when npm start with React application 执行 npm 启动时 Azure 功能节点错误 - Azure functions node error when doing npm start 当我在 cmd 中使用 npm start 启动我的反应应用程序时,我收到以下错误 - when I use npm start in cmd to start my react app iam getting the following error 当我输入“npm run serve”时,我得到一个 SyntaxError。 错误是:意外的令牌,预期的“,”(45:2)。 我究竟做错了什么? - I get a SyntaxError when I type 'npm run serve'. The error is: Unexpected token, expected "," (45:2). What am I doing wrong?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM