Angularjs windows 7中的reslove npm启动错误

Angularjs windows 7中的reslove npm启动错误,angularjs,node.js,npm,Angularjs,Node.js,Npm,如何解决这个问题。在这里,我需要在WindowsOS7 64位操作系统中重新解决这个问题。 我在Windows7中安装了nodejs,并打开输入的命令提示符 npm版本 我创建了一个项目文件夹,当我安装npm时安装angular js,它工作正常,但是我得到了如下命令 E:\project\Demo>npm start 'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules

如何解决这个问题。在这里,我需要在WindowsOS7 64位操作系统中重新解决这个问题。 我在Windows7中安装了nodejs,并打开输入的命令提示符

npm版本

我创建了一个项目文件夹,当我安装npm时安装angular js,它工作正常,但是我得到了如下命令

 E:\project\Demo>npm start
   'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules
    \npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command,
     operable program or batch file.

    > angular-quickstart@1.0.0 prestart E:\project\Demo
    > npm run build


    npm ERR! Windows_NT 6.1.7601
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
   npm ERR! node v6.11.4
   npm ERR! npm  v3.10.10
   npm ERR! file C:\Windows\system32\cmd.exe;C:\xampp\php;
   npm ERR! path C:\Windows\system32\cmd.exe;C:\xampp\php;
   npm ERR! code ELIFECYCLE
   npm ERR! errno ENOENT
   npm ERR! syscall spawn C:\Windows\system32\cmd.exe;C:\xampp\php;
   npm ERR! angular-quickstart@1.0.0 prestart: `npm run build`
   npm ERR! spawn C:\Windows\system32\cmd.exe;C:\xampp\php; ENOENT
   npm ERR!
   npm ERR! Failed at the angular-quickstart@1.0.0 prestart script 'npm run build'.

        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 angular-quickstart package,
     npm ERR! not with npm itself.
     npm ERR! Tell the author that this fails on your system:
     npm ERR!     npm run build
     npm ERR! You can get information on how to open an issue for this project with:
     npm ERR!     npm bugs angular-quickstart
     npm ERR! Or if that isn't available, you can get their info via:
     npm ERR!     npm owner ls angular-quickstart
     npm ERR! There is likely additional logging output above.
     npm ERR! Windows_NT 6.1.7601
     npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" 
    "C:\\ProgramFiles\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
    npm ERR! node v6.11.4
    npm ERR! npm  v3.10.10
    npm ERR! code ELIFECYCLE

    npm ERR! angular-quickstart@1.0.0 prestart: `npm run build`
    npm ERR! Exit status -4058
    npm ERR!
    npm ERR! Failed at the angular-quickstart@1.0.0 prestart script 'npm run build'.

   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 angular-quickstart package,
   npm ERR! not with npm itself.
   npm ERR! Tell the author that this fails on your system:
   npm ERR!     npm run build
   npm ERR! You can get information on how to open an issue for this project with:
   npm ERR!     npm bugs angular-quickstart
   npm ERR! Or if that isn't available, you can get their info via:
   npm ERR!     npm owner ls angular-quickstart
   npm ERR! There is likely additional logging output above.

   npm ERR! Please include the following file with any support request:
   npm ERR!     E:\project\Demo\npm-debug.log
包json

    {
    "name": "angular-quickstart",
 "version": "1.0.0",
 "description": "QuickStart package.json from the documentation, supplemented with testing support",
  "scripts": {
  "build": "tsc -p src/",
  "build:watch": "tsc -p src/ -w",
  "build:e2e": "tsc -p e2e/",
  "serve": "lite-server -c=bs-config.json",
  "serve:e2e": "lite-server -c=bs-config.e2e.json",
  "prestart": "npm run build",
"start": "concurrently \"npm run build:watch\" \"npm run serve\"",
"pree2e": "npm run build:e2e",
 "e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first",
"preprotractor": "webdriver-manager update",
"protractor": "protractor protractor.config.js",
"pretest": "npm run build",
"test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"",
 "pretest:once": "npm run build",
 "test:once": "karma start karma.conf.js --single-run",
 "lint": "tslint ./src/**/*.ts -t verbose"
   },
 "keywords": [],
 "author": "",
 "license": "MIT",
"dependencies": {
"@angular/common": "~4.3.4",
"@angular/compiler": "~4.3.4",
"@angular/core": "~4.3.4",
"@angular/forms": "~4.3.4",
"@angular/http": "~4.3.4",
"@angular/platform-browser": "~4.3.4",
"@angular/platform-browser-dynamic": "~4.3.4",
"@angular/router": "~4.3.4",

"angular-in-memory-web-api": "~0.3.0",
"systemjs": "0.19.40",
"core-js": "^2.4.1",
"rxjs": "5.0.1",
  "zone.js": "^0.8.4"
   },
 "devDependencies": {
"concurrently": "^3.2.0",
"lite-server": "^2.2.2",
"typescript": "~2.1.0",

"canonical-path": "0.0.2",
"tslint": "^3.15.1",
"lodash": "^4.16.4",
"jasmine-core": "~2.4.1",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~4.0.14",
 "rimraf": "^2.5.4",
 "@types/node": "^6.0.46",
"@types/jasmine": "2.5.36"
   },
  "repository": {}
}

在运行
npm start
execute
npm i
@级别之前,您可以在该级别获得您的
package.json
如果您有
bower.json


在运行
npm start
execute
npm i
@级别之前,在cmd.

中使用
SET
检查环境变量中的节点 如果您有
bower.json

使用cmd中的
SET
检查环境变量中的节点。

我在github上找到了。显然,如果环境变量中存在错误,则会出现此错误。在windows上打开PATH变量,检查对话框窗口中是否有任何奇怪的分号或标志:

如果是这样,请修复它们,然后重试我在github上找到的。显然,如果环境变量中存在错误,则会出现此错误。在windows上打开PATH变量,检查对话框窗口中是否有任何奇怪的分号或标志:


如果是,请修复它们并重试

您是否在电脑中安装了
节点
?也。可能您没有将npm/节点添加到您的环境变量。我检查了环境路径是否已添加到我的系统中。路径C:\Program Files\nodejs\。这是我添加的一个。您是否在电脑中安装了
node
?也。可能您没有将npm/节点添加到您的环境变量。我检查了环境路径是否已添加到我的系统中。路径C:\Program Files\nodejs\。这是我添加的。CALL“C:\Program Files\nodejs\\node.exe”C:\Program Files\nodejs\\node\u modules\npm\bin\npm cli.js“prefix-g”不能识别为内部或外部命令、可操作程序或批处理文件。错误共享您的
包.json
更改您的
变量环境
,并将真实目录添加到nodejs,以便放置
C:\Program Files\nodejs\bin`检查是否有bin文件夹
包。json
看起来不错。。。在“环境变量”部分的“系统变量”中检查路径。它应该包含节点调用“C:\Program Files\nodejs\\node.exe”的路径“C:\Program Files\nodejs\\node\u modules\npm\bin\npm cli.js”前缀-g不被识别为内部或外部命令、可操作程序或批处理文件。错误共享您的
包.json
更改您的
变量环境
,并将真实目录添加到nodejs,以便放置
C:\Program Files\nodejs\bin`检查是否有bin文件夹
包。json
看起来不错。。。在“环境变量”部分的“系统变量”中检查路径。它应该包含到节点的路径
    {
    "name": "angular-quickstart",
 "version": "1.0.0",
 "description": "QuickStart package.json from the documentation, supplemented with testing support",
  "scripts": {
  "build": "tsc -p src/",
  "build:watch": "tsc -p src/ -w",
  "build:e2e": "tsc -p e2e/",
  "serve": "lite-server -c=bs-config.json",
  "serve:e2e": "lite-server -c=bs-config.e2e.json",
  "prestart": "npm run build",
"start": "concurrently \"npm run build:watch\" \"npm run serve\"",
"pree2e": "npm run build:e2e",
 "e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first",
"preprotractor": "webdriver-manager update",
"protractor": "protractor protractor.config.js",
"pretest": "npm run build",
"test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"",
 "pretest:once": "npm run build",
 "test:once": "karma start karma.conf.js --single-run",
 "lint": "tslint ./src/**/*.ts -t verbose"
   },
 "keywords": [],
 "author": "",
 "license": "MIT",
"dependencies": {
"@angular/common": "~4.3.4",
"@angular/compiler": "~4.3.4",
"@angular/core": "~4.3.4",
"@angular/forms": "~4.3.4",
"@angular/http": "~4.3.4",
"@angular/platform-browser": "~4.3.4",
"@angular/platform-browser-dynamic": "~4.3.4",
"@angular/router": "~4.3.4",

"angular-in-memory-web-api": "~0.3.0",
"systemjs": "0.19.40",
"core-js": "^2.4.1",
"rxjs": "5.0.1",
  "zone.js": "^0.8.4"
   },
 "devDependencies": {
"concurrently": "^3.2.0",
"lite-server": "^2.2.2",
"typescript": "~2.1.0",

"canonical-path": "0.0.2",
"tslint": "^3.15.1",
"lodash": "^4.16.4",
"jasmine-core": "~2.4.1",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~4.0.14",
 "rimraf": "^2.5.4",
 "@types/node": "^6.0.46",
"@types/jasmine": "2.5.36"
   },
  "repository": {}
}