Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.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
Angularjs 错误发生在xxxx@1.4.0-rc.6安装后脚本';打字安装';_Angularjs_Npm_Webpack_Typescript Typings - Fatal编程技术网

Angularjs 错误发生在xxxx@1.4.0-rc.6安装后脚本';打字安装';

Angularjs 错误发生在xxxx@1.4.0-rc.6安装后脚本';打字安装';,angularjs,npm,webpack,typescript-typings,Angularjs,Npm,Webpack,Typescript Typings,在发出命令“npm install”时,我有以下配置。我面临的错误是在测试中失败xxxx@1.4.0-rc.6 postinstall脚本“typings install”如下所示,有人能帮我吗 package.json:- { "name": "xxxx", "version": "1.4.0-rc.6", "description": "xxxx Dev with Angular 2, Express.js, Mongoose.js, Node.js", "author": "Desh Ra

在发出命令“npm install”时,我有以下配置。我面临的错误是在测试中失败xxxx@1.4.0-rc.6 postinstall脚本“typings install”如下所示,有人能帮我吗

package.json:-

{
"name": "xxxx",
"version": "1.4.0-rc.6",
"description": "xxxx Dev with Angular 2, Express.js, Mongoose.js, Node.js",
"author": "Desh Raj",
"scripts": {
  "postinstall": "typings install",
  "prestart": "webpack",
  "start": "concurrently \"webpack --watch --colors\" \"nodemon src/server.js\"",
  "typings": "typings"
},
"license": "MIT",
"dependencies": {
  "@angular/common": "2.0.0-rc.6",
  "@angular/compiler": "2.0.0-rc.6",
  "@angular/core": "2.0.0-rc.6",
  "@angular/forms": "2.0.0-rc.6",
  "@angular/http": "2.0.0-rc.6",
  "@angular/platform-browser": "2.0.0-rc.6",
  "@angular/platform-browser-dynamic": "2.0.0-rc.6",
  "@angular/router": "3.0.0-rc.2",
  "@angular/router-deprecated": "2.0.0-rc.2",
  "@angular/upgrade": "2.0.0-rc.6",
  "angular2-in-memory-web-api": "0.0.15",
  "angular2-jwt": "^0.1.23",
  "body-parser": "^1.15.2",
  "bootstrap": "^3.3.6",
  "core-js": "^2.4.1",
  "express": "^4.14.0",
  "font-awesome": "^4.6.3",
  "jquery": "^2.2.4",
  "mongoose": "^4.5.10",
  "morgan": "^1.7.0",
  "ng2-completer": "^0.2.3",
  "reflect-metadata": "^0.1.3",
  "rxjs": "5.0.0-beta.11",
  "systemjs": "0.19.27",
  "tether": "^1.3.6",
  "zone.js": "^0.6.17"
},
"devDependencies": {
  "concurrently": "^2.2.0",
  "nodemon": "^1.10.2",
  "source-map-loader": "^0.1.5",
  "ts-loader": "^0.8.2",
  "typescript": "^1.8.10",
  "typings": "^1.3.3",
  "webpack": "^1.13.2"
}}
我执行“npm安装-g打字”和“npm安装-g网页包”,但仍然得到以下错误:-

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using npm@3.5.2
3 info using node@v4.2.6
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle myPleaks@1.4.0-rc.6~prestart: myPleaks@1.4.0-rc.6
6 verbose lifecycle myPleaks@1.4.0-rc.6~prestart: unsafe-perm in lifecycle true
7 verbose lifecycle myPleaks@1.4.0-rc.6~prestart: PATH: /usr/share/npm/bin/node-gyp-bin:/home/ubuntu/mypleaks-angular/myPleaks/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
8 verbose lifecycle myPleaks@1.4.0-rc.6~prestart: CWD: /home/ubuntu/mypleaks-angular/myPleaks
9 silly lifecycle myPleaks@1.4.0-rc.6~prestart: Args: [ '-c', 'webpack' ]
10 info lifecycle myPleaks@1.4.0-rc.6~prestart: Failed to exec prestart script
11 verbose stack Error: myPleaks@1.4.0-rc.6 prestart: `webpack`
11 verbose stack spawn ENOENT
11 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:17:16)
11 verbose stack     at emitTwo (events.js:87:13)
11 verbose stack     at ChildProcess.emit (events.js:172:7)
11 verbose stack     at maybeClose (internal/child_process.js:821:16)
11 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
12 verbose pkgid myPleaks@1.4.0-rc.6
13 verbose cwd /home/ubuntu/mypleaks-angular/myPleaks
14 error Linux 4.4.0-1013-aws
15 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
16 error node v4.2.6
17 error npm  v3.5.2
18 error file sh
19 error code ELIFECYCLE
20 error errno ENOENT
21 error syscall spawn
22 error myPleaks@1.4.0-rc.6 prestart: `webpack`
22 error spawn ENOENT
23 error Failed at the myPleaks@1.4.0-rc.6 prestart script 'webpack'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the myPleaks package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     webpack
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs myPleaks
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls myPleaks
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
0信息如果它以ok结尾,它就工作了
1详细cli['/usr/bin/nodejs','/usr/bin/npm','start']
2信息使用npm@3.5.2
3信息使用node@v4.2.6
4详细的运行脚本['prestart','start','poststart']
5信息生命周期myPleaks@1.4.0-rc.6~开工前:myPleaks@1.4.0-rc.6
6详细的生命周期myPleaks@1.4.0-rc.6~启动前:生命周期中的不安全烫发
7详细的生命周期myPleaks@1.4.0-rc.6~prestart:PATH:/usr/share/npm/bin/node-gyp-bin:/home/ubuntu/mypleaks-angular/mypleaks/node\u-modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/snap/bin
8详细的生命周期myPleaks@1.4.0-rc.6~启动前:CWD:/home/ubuntu/mypleaks angular/mypleaks
9愚蠢的生命周期myPleaks@1.4.0-rc.6~开始前:参数:['-c','webpack']
10信息生命周期myPleaks@1.4.0-rc.6~预启动:无法执行预启动脚本
11详细堆栈错误:myPleaks@1.4.0-rc.6启动前:`网页包`
11详细堆栈生成eNONT
11子进程上的详细堆栈。(/usr/share/npm/lib/utils/spawn.js:17:16)
11 emitTwo上的详细堆栈(events.js:87:13)
11 ChildProcess.emit上的详细堆栈(events.js:172:7)
11 maybeClose的详细堆栈(internal/child_process.js:821:16)
11 Process.ChildProcess.\u handle.onexit处的详细堆栈(internal/child\u Process.js:211:5)
12详细的pkgidmyPleaks@1.4.0-rc.6
13详细cwd/home/ubuntu/mypleaks/mypleaks
14错误Linux 4.4.0-1013-aws
15错误argv“/usr/bin/nodejs”“/usr/bin/npm”“启动”
16错误节点v4.2.6
17错误npm v3.5.2
18错误文件sh
19错误代码ELIFECYCLE
20错误无错误
21错误系统调用生成
22错误myPleaks@1.4.0-rc.6启动前:`网页包`
22错误产卵事件
23发生错误时失败myPleaks@1.4.0-rc.6启动前脚本“网页包”。
23错误确保已安装最新版本的node.js和npm。
23错误如果您这样做,这很可能是myPleaks软件包的问题,
23与npm本身无关的错误。
23错误告诉作者此操作在您的系统上失败:
23错误网页
23错误您可以通过以下方式获取有关如何打开此项目问题的信息:
23错误npm错误myPleaks
23错误或如果不可用,您可以通过以下方式获取他们的信息:
23错误npm所有者ls myPleaks
23错误上面可能有额外的日志输出。
24详细退出[1,true]

您是否在全局范围内安装了
打字?
我也尝试使用“npm安装-保存打字全局”添加它,但没有安装,在编辑问题时显示错误。您应该使用
npm安装-g打字
我执行“npm安装-g打字”和“npm安装-g网页包”,但仍会出现问题(已编辑)中所示的错误。能否从cli启动命令
webpack