运行命令npm install nw-gyp -y时,提示'make' 不是内部或外部命令,也不是可运行的程序 是怎么回事?
在运行命令时提示
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz
npm http 200 https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz
npm http 200 https://registry.npmjs.org/glob/-/glob-3.2.9.tgz
npm http 200 https://registry.npmjs.org/rimraf
npm http 200 https://registry.npmjs.org/tar
npm http GET https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz
npm http GET https://registry.npmjs.org/tar/-/tar-0.1.19.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz
npm http 200 https://registry.npmjs.org/which/-/which-1.0.5.tgz
npm http 200 https://registry.npmjs.org/npmlog/-/npmlog-0.0.6.tgz
npm http 200 https://registry.npmjs.org/semver/-/semver-2.2.1.tgz
npm http 200 https://registry.npmjs.org/osenv
npm http GET https://registry.npmjs.org/osenv/-/osenv-0.0.3.tgz
> semver[@2](/user/2).2.1 prepublish c:\Users\qiuying\AppData\Local\Temp\npm-3792-PyXZrqaO\
semver-2.2.11398132163214-0.5476104218978435\package
> make
npm http 200 https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz
npm http 200 https://registry.npmjs.org/tar/-/tar-0.1.19.tgz
npm http 200 https://registry.npmjs.org/osenv/-/osenv-0.0.3.tgz
'make' 不是内部或外部命令,也不是可运行的程序或批处理文件。
npm ERR! addLocalDirectory Could not pack "c:\\Users\\qiuying\\AppData\\Local\\T
emp\\npm-3792-PyXZrqaO\\semver-2.2.11398132163214-0.5476104218978435\\package" t
o "C:\\Users\\qiuying\\AppData\\Roaming\\npm-cache\\semver\\2.2.1\\package.tgz"
npm ERR! weird error 1
npm ERR! tar.unpack error reading c:\Users\qiuying\AppData\Local\Temp\npm-3792-P
yXZrqaO\tar-0.1.191398132163565-0.8656692011281848\tmp.tgz
npm http 200 https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/request/-/request-2.34.0.tgz
npm http 200 https://registry.npmjs.org/request/-/request-2.34.0.tgz
npm http 200 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz
npm http 200 https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/fstream/-/fstream-0.1.25.tgz
npm http 200 https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz
npm http 200 https://registry.npmjs.org/fstream/-/fstream-0.1.25.tgz
npm ERR! not ok code 0
我发现是按照其中的库
semver[@2](/user/2).2.1 prepublish c:\Users\qiuying\AppData\Local\Temp\npm-3792-PyXZrqaO\
semver-2.2.11398132163214-0.5476104218978435\package
> make
安装 semver 时提示的错误
7 回复
make不在PATH上
window也要设置这个环境变量吗? make也是一个插件啊,我装了
windows … 你要用make 得安装cy 才行啊…
Windows 下也有Make的, 我的make就是由另一个IDE自带的, 你也可以搜索下载:
mingw32
或 GNU make for Windows
.
MinGW32
需要把其可执行文件改名为make.exe
我这边还是不行,不知道原因,但是在同事的机器上是可以的,先把这个问题放一放吧
我转移到centos上了,很容易就装上了