如何在Windows 8.1上安装nodejs依赖关系?

如何在Windows 8.1上安装nodejs依赖关系? 我有安装在c:/ program files / nodejs下的nodejs

当我发出npm install命令时,出现以下错误:

 > cd myproject Current working directory is 'C:\wamp\www\laravel\myproject'. > "C:\Program Files\nodejs\npm.cmd" install npm WARN package.json @ No repository field. > node-sass@2.0.1 install C:\wamp\www\laravel\myproject\node_modules\laravel-elixir\node_modules\gulp-sass\node_modules\node-sass > node scripts/install.js > node-sass@2.0.1 postinstall C:\wamp\www\laravel\myproject\node_modules\laravel-elixir\node_modules\gulp-sass\node_modules\node-sass > node scripts/build.js `win32-x64-node-0.12` exists; testing Binary is fine; exiting npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! path C:\wamp\www\laravel\myproject\node_modules\laravel-elixir\node_modules\gulp-ruby-sass\node_modules\vinyl-fs\node_modules\glob-stream\node_modules\unique-stream\node_modules\es6-set\node_modules\d\package.json npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! enoent ENOENT, open 'C:\wamp\www\laravel\myproject\node_modules\laravel-elixir\node_modules\gulp-ruby-sass\node_modules\vinyl-fs\node_modules\glob-stream\node_modules\unique-stream\node_modules\es6-set\node_modules\d\package.json' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent npm ERR! Please include the following file with any support request: npm ERR! C:\wamp\www\laravel\myproject\npm-debug.log 

任何人可以提供如何让这个工作在Windows 8.1的指示? 在下面的目录C:\wamp\www\laravel\myproject中,发出npm install命令 – 该目录具有以下package.json文件:

 { "devDependencies": { "gulp": "^3.8.8", "laravel-elixir": "*" } } 

看来npm在依赖关系的一个依赖关系中找不到package.json文件。

它工作正常使用您的package.json文件和运行npm install所以我build议删除node_modules文件夹,再次运行npm install命令。

当运行npm install npm查找当前目录中的package.json时,看起来错误是由于运行命令的目录中没有package.json文件。

如果您没有package.json文件来安装当前目录下的软件包,也可以运行npm install {package} 。 添加-g选项以在节点核心目录中全局安装软件包。

Interesting Posts