为什么我没有node-gyp目录? [英] Why don't I have a node-gyp directory?

查看:399
本文介绍了为什么我没有node-gyp目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我卸载并重新安装了node-gyp,当我转到目录时:

I uninstalled and reinstalled node-gyp, and when I go to the directory:

C:\Program Files\nodejs\node_modules\npm\

,没有 \\\
ode-gyp \
目录。我还通过在此目录中使用 npm ls 命令检查node-gyp是否存在:

, there is no \node-gyp\ directory. I've also checked to see if node-gyp even exists by using the npm ls command in this directory:

C:\Program Files\nodejs\

它说它包含 node-gyp@3.6.2 ,所以它确实存在。为什么在安装node-gyp时没有创建node-gyp目录? node-gyp的版本如下所示:



我尝试过:



It says that it contains node-gyp@3.6.2, so it does exist. Why isn't a node-gyp directory being created when I install node-gyp? The version of node-gyp is as stated below:

What I have tried:

C:\Program Files\nodejs>npm ls
C:\Program Files\nodejs
`-- npm@3.10.10

//稍微减少

// Skipping down a bit

+-- node-gyp@3.4.0
 | +-- minimatch@3.0.3
 | | `-- brace-expansion@1.1.6
 | |   +-- balanced-match@0.4.2
 | |   `-- concat-map@0.0.1
 | +-- npmlog@3.1.2
 | | +-- are-we-there-yet@1.1.2
 | | | `-- delegates@1.0.0
 | | +-- console-control-strings@1.1.0
 | | +-- gauge@2.6.0
 | | | +-- has-color@0.1.7
 | | | +-- object-assign@4.1.0
 | | | +-- signal-exit@3.0.0
 | | | +-- string-width@1.0.2
 | | | | +-- code-point-at@1.0.0
 | | | | | `-- number-is-nan@1.0.0
 | | | | `-- is-fullwidth-code-point@1.0.0
 | | | |   `-- number-is-nan@1.0.0
 | | | `-- wide-align@1.1.0
 | | `-- set-blocking@2.0.0
 | `-- path-array@1.0.1
 |   `-- array-index@1.0.0
 |     +-- debug@2.2.0
 |     | `-- ms@0.7.1
 |     `-- es6-symbol@3.1.0
 |       +-- d@0.1.1
 |       `-- es5-ext@0.10.12
 |         `-- es6-iterator@2.0.0

推荐答案





你是如何安装node-gyp的?

您是否添加了 -g 标志?



npm list -g --depth = 0

你看到node-gyp吗?



然后,以管理员身份运行cmd 并执行:

npm uninstall node-gyp -g



然后,运行

npm install node-gyp -g



如果它没有帮助,你可能需要清除npm缓存或更新node / npm本身吗?

清除缓存: npm cache clear --force (请谨慎使用!)



注意:请仔细更新npm模块,从npm版本5开始可能会破坏更改。



如果您已将node.js和npm更新为版本5+,您可以以管理员身份执行:

npm doctor -g



查看可能的问题......
Hi,

how are you installing node-gyp?
Have you added -g flag?

npm list -g --depth=0
do you see node-gyp?

Then, run cmd as Administrator and do:
npm uninstall node-gyp -g

then, run
npm install node-gyp -g

If it doesn't help, may be you need to clear npm cache or update node/npm itself?
To clear cache: npm cache clear --force (use with caution!)

NOTE: update npm module carefully, starting from npm version 5 there are may be breaking changes.

If you have updated node.js and npm to version 5+, you can do, as Administrator:
npm doctor -g

To see possible issues...


这篇关于为什么我没有node-gyp目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆