Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/41.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
Node.js 安装角度生成器时出错_Node.js_Angularjs_Gruntjs_Yeoman - Fatal编程技术网

Node.js 安装角度生成器时出错

Node.js 安装角度生成器时出错,node.js,angularjs,gruntjs,yeoman,Node.js,Angularjs,Gruntjs,Yeoman,我正在尝试使用Node为yeoman安装angular软件包。这是我运行的命令 “npm安装-g发电机角度” 在我得到这个错误之前,一切似乎都正常 node-gyp rebuild gyp ERR! configure error gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead gyp ERR! stack at install (/usr

我正在尝试使用Node为yeoman安装angular软件包。这是我运行的命令

“npm安装-g发电机角度”

在我得到这个错误之前,一切似乎都正常

node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack     at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:65:16)
gyp ERR! stack     at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37)
gyp ERR! stack     at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:150:20)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:93:9
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:659:7)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:101:17)
gyp ERR! stack     at maybeClose (child_process.js:773:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:840:5)
gyp ERR! System Linux 3.8.0-37-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.11.10-pre
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
再往下,它返回这个错误

npm ERR! Error: ENOENT, lstat '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/cssstyle/lib/properties/webkitFlexFlow.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.8.0-37-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "generator" "angular"
npm ERR! cwd /home/colin
npm ERR! node -v v0.11.10-pre
npm ERR! npm -v 1.3.15
npm ERR! path /home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/cssstyle/lib/properties/webkitFlexFlow.js
npm ERR! fstream_path /home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/cssstyle/lib/properties/webkitFlexFlow.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:97:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/hawk/test'
npm ERR! error rolling back  jsdom@0.8.11 { [Error: ENOTEMPTY, rmdir '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/hawk/test']
npm ERR! error rolling back   stack: 'Error: ENOTEMPTY, rmdir \'/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/hawk/test\'',
npm ERR! error rolling back   errno: -39,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/hawk/test' }
npm ERR! Error: ENOENT, open '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.8.0-37-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "generator" "angular"
npm ERR! cwd /home/colin
npm ERR! node -v v0.11.10-pre
npm ERR! npm -v 1.3.15
npm ERR! path /home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js
npm ERR! code ENOENT
npm ERR! errno -2
npm WARN optional dep failed, continuing hawk@1.0.0
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules'
npm ERR! error rolling back  angular@1.2.16 { [Error: ENOTEMPTY, rmdir '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules']
npm ERR! error rolling back   stack: 'Error: ENOTEMPTY, rmdir \'/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules\'',
npm ERR! error rolling back   errno: -39,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules' }
npm ERR! contextify@0.1.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the contextify@0.1.8 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.8.0-37-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "generator" "angular"
npm ERR! cwd /home/colin
npm ERR! node -v v0.11.10-pre
npm ERR! npm -v 1.3.15
npm ERR! code ELIFECYCLE
npm http 304 https://registry.npmjs.org/punycode
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/colin/npm-debug.log
npm ERR! not ok code 0
我用更改了本地目录的权限

“sudo chown-R
whoami
/usr/local/”

我认为这是一个权限或路径错误,但我不知道我在这里处理什么

这可能是因为约曼问题吗?

不是

npm install -g generator angular
它是


发电机和角发电机之间的破折号。

你说得对,我在这篇文章中不小心写错了。我会修好的。
npm install -g generator angular
npm install -g generator-angular