尝试从github安装模块导致:
package.json上的ENOENT错误.
使用快递轻松复制:
npm install https://github.com/visionmedia/express
抛出错误.
npm install express
作品.
为什么我不能从github安装?
这是控制台输出:
npm http GET https://github.com/visionmedia/express.git
npm http 200 https://github.com/visionmedia/express.git
npm ERR! not a package /home/guym/tmp/npm-32312/1373176518024-0.6586997057311237/tmp.tgz
npm ERR! Error: ENOENT, open '/home/guym/tmp/npm-32312/1373176518024-0.6586997057311237/package/package.json'
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-23-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "https://github.com/visionmedia/express.git"
npm ERR! cwd /home/guym/dev_env/projects_GIT/proj/somename
npm ERR! node -v v0.10.10
npm ERR! …
Run Code Online (Sandbox Code Playgroud) 运行npm install
所需的node-gyp
... 时看到以下错误,但可能由任何需要的东西触发xcode-select
.
xcode-select:错误:工具'xcodebuild'需要Xcode,但是活动的开发人员目录'/ Library/Developer/CommandLineTools'是一个命令行工具实例
问题是什么?
我刚刚升级到npm @ 5.我现在有一个package-lock.json文件,其中包含package.json中的所有内容.我希望,当我运行时npm install
,将从锁定文件中提取依赖版本以确定应该在我的node_modules目录中安装什么.奇怪的是它实际上最终修改并重写了我的package-lock.json文件.
例如,锁定文件的typescript指定为版本2.1.6.然后,在npm install
命令之后,版本更改为2.4.1.这似乎打败了锁定文件的整个目的.
我错过了什么?如何让npm真正尊重我的锁文件?
我有一个下载的模块仓库,我想在本地安装,而不是全局安装在另一个目录中?
有什么简单的方法可以做到这一点?
我正在尝试将nodeJs安装到我的Ubuntu 14.04中以便使用GruntJs.
我已经阅读了Ubuntu不同的做法(问题?),所以这就是我为安装它而做的事情:
sudo apt-get install npm
sudo npm install -g grunt-cli
Run Code Online (Sandbox Code Playgroud)
在那之后打字咕噜我有错误:
/usr/bin/env: node: No such file or directory
Run Code Online (Sandbox Code Playgroud)
所以,我试过了:
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)
再试一次,仍然得到错误,我试过:
sudo add-apt-repository https://launchpad.net/~chris-lea/+archive/node.js/
sudo apt-get install -y nodejs
Run Code Online (Sandbox Code Playgroud)
我有这样的信息:
nodejs is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.
Run Code Online (Sandbox Code Playgroud)
我确实尝试过清理,以防万一:
sudo apt-get autoremove
Run Code Online (Sandbox Code Playgroud)
但是没有,错误仍然存在:当我输入咕噜声时,我仍然会得到 /usr/bin/env: node: No such …
我在Windows 10上,使用Node 5.6.0和npm 3.6.0.我正在尝试将angular-material和mdi安装到我的工作文件夹中.npm install angular-material mdi错误:
+-- angular@1.5.0
+-- UNMET PEER DEPENDENCY angular-animate@^1.5.0
+-- UNMET PEER DEPENDENCY angular-aria@^1.5.0
+-- angular-material@1.0.6
+-- UNMET PEER DEPENDENCY angular-messages@^1.5.0 `-- mdi@1.4.57
npm WARN enoent ENOENT: no such file or directory, open
'C:\Users\xxxxx\Desktop\ngClassifieds\package.json'
npm WARN angular-material@1.0.6 requires a peer of
angular-animate@^1.5.0 but none was installed.
npm WARN angular-material@1.0.6 requires a peer of angular-aria@^1.5.0
but none was installed.
npm WARN angular-material@1.0.6 requires a peer of
angular-messages@^1.5.0 but none was installed.
Run Code Online (Sandbox Code Playgroud)
如何解决此问题以安装AngularJS Material和MDI?
最近我转而使用Node v.6,它开始在运行普通版本时创建越来越多的问题grunt/gulp/webpack
例如:
$ gulp
[14:02:20] Local gulp not found in ~/_Other/angular-2-ts/angular2-seed
[14:02:20] Try running: npm install gulp
Run Code Online (Sandbox Code Playgroud)
gulp和所有其他插件和模块rm -rf node_modules
在/ node_modules文件夹中安装(甚至重新安装).
大多数错误都有类似的行
(node:42) fs: re-evaluating native module sources is not supported.
If you are using the graceful-fs module,
please update it to a more recent version.
Run Code Online (Sandbox Code Playgroud)
42为任意数
就像我提交的那个问题一样 - 在angular2-seed repo中https://github.com/mgechev/angular2-seed/issues/902
我试图做的是通过n(https://www.npmjs.com/package/n)降级到Node v.5 - 它工作正常.然后删除所有node_modules
文件夹,然后执行
npm info graceful-fs -v
3.3.6
Run Code Online (Sandbox Code Playgroud)
好的,让我们升级或删除并安装新的:
npm i graceful-fs@latest
npm i graceful-fs@4.1.4
sudo npm i graceful-fs@4.1.4 -g …
Run Code Online (Sandbox Code Playgroud) 目前我的机器上安装了TypeScript 1.0.3.0版本.
我想将它更新到最新的即2.0.
如何用npm做到这一点?
我正在尝试学习反应,所以我有这个示例代码为fullstack反应投票应用程序,我试图让它工作,但在运行npm install后跟npm start我收到以下错误:
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "server"
npm ERR! node v7.5.0
npm ERR! npm v4.3.0
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! voting_app@1.1.0 server: `live-server --public --
host=localhost --port=3000 --middleware=./disable-browser-cache.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the voting_app@1.1.0 server script 'live-server --
public --host=localhost --port=3000 --middleware=./disable-browser-
cache.js'.
npm ERR! Make sure you have the latest version of node.js …
Run Code Online (Sandbox Code Playgroud) npm-install ×10
npm ×7
node.js ×6
node-modules ×3
javascript ×2
angularjs ×1
github ×1
gruntjs ×1
macos ×1
npm-start ×1
npx ×1
packages ×1
reactjs ×1
typescript ×1
ubuntu ×1
xcode ×1
yarnpkg ×1