如何在windows 8.1上安装nodejs依赖项?我将nodejs安装在c:/program files/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 有没有人能提供关于如何在windows8.1上工作的指导?在以下目录C:\wamp\www\laravel\myproject中发出npm install命令-该目录包含以下package.json文件:
{
"devDependencies": {
"gulp": "^3.8.8",
"laravel-elixir": "*"
}
} 发布于 2015-03-23 22:39:57
似乎npm在您的依赖项中的一个依赖项中找到package.json文件时遇到了问题。
使用您的package.json文件并运行npm install对我来说工作得很好,所以我建议删除node_modules文件夹并再次运行npm install命令。
当运行npm install npm在当前目录中查找package.json时,错误似乎是由于您运行命令的目录中没有package.json文件造成的。
如果在当前目录中没有package.json文件来安装包,也可以运行npm install {package}。添加-g选项,在节点核心目录中全局安装软件包。
https://stackoverflow.com/questions/29209456
复制相似问题