Tag: npm

npm链接多个本地(相互依赖)模块

我有3个node.js模块, A , B和C 所有这些都是私人的git回购。 A取决于B取决于C Git克隆A和做npm install就像一个魅力。 但是,当在模块A上编码时,我也想在B (和C )上工作。 后两者也是git克隆的。 而npm link ../pathto/B效果很好。 而由于B依赖于C , npm link负责将C安装到B/node_modules/C 。 它是一个静态文件克隆,被B 。 所以当做npm link ../pathto/C ,会产生A/node_modules/C (是一个符号链接)。 但是,这就是问题, B将使用它的静态克隆,而不是我已经链接到A/node_modules/C A/ … node_modules/ B -> B/ C -> C/ B/ … node_modules/ C/ … C/ … 有没有人有解决这个问题的想法?

node / npm无法通过OSX 10.9.4上的brew进行安装

我认为这是一个新的问题,花了几个小时才弄明白: $ brew install node -v ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/node- 0.10.31.mavericks.bottle.tar.gz .. npm ERR! Error: EACCES, mkdir '/../.npm/nopt/2.1.2' npm ERR! { [Error: EACCES, mkdir '/../.npm/nopt/2.1.2'] npm ERR! errno: 3, npm ERR! code: 'EACCES',

使用自定义nodejs安装运行npm install

我在我的Ubuntu 12.04系统中安装了2个nodejs v0.8.18 (可执行文件名是node )和v0.10.20 (可执行文件名是nodejs )。 当我运行npm install如何指定npm使用名为“nodejs”的可执行文件而不是“node”

运行npm update时出错:找不到兼容版本:fsevents

我正在尝试安装一个运行Angular Karma的新的构build服务器,而且我遇到了问题。 当我运行npm更新时,出现以下错误: 381 error notarget No compatible version found: fsevents@'pipobscure/fsevents#7dcdf9fa3f8956610fd6f69f72c67bace2de7138' 381 error notarget Valid install targets: 381 error notarget ["0.1.1","0.1.3","0.1.4","0.1.5","0.1.6","0.2.0","0.3.0"] 381 error notarget 381 error notarget This is most likely not a problem with npm itself. 381 error notarget In most cases you or one of your dependencies are requesting 381 error notarget a […]

根本无法安装快递发生器(只在笔记本电脑上,桌面上没有问题)

我正在尝试启动并运行node.js express,但在安装阶段遇到问题。 我已经安装好了,npm工作正常。 机器:Windows 7上的MacBook Air 2011 我第一次试图通过npm install -g express来安装express,但是在错误发生后遇到错误,我猜不是那么简单。 我在快速网站上跟随了一些build议,在我想要安装的目录中创build一个package.json文件,所以我这样做了: 的package.json: { "name": "tutorial", "description": "tutorial test app", "version": "0.0.1", "private": true, "dependencies": { "express": "4.x" } } 然后我打了npm install ,最后把安装目录安装到了目录(npm命令和package.json所在的目录) 现在我按照快速指南中的说明尝试npm install -g express-generator ,但是我遇到了与之前一样的错误: c:\code\node\tutorial>npm install -g express-generator C:\Users\JosephGoss\AppData\Roaming\npm\express -> C:\Users\JosephGoss\AppData\Roaming\npm\node_modules\express-generato r\bin\express npm ERR! peerinvalid The package flatiron does not satisfy […]

我怎样才能打开web应用程序需要node.js

我必须运行微型爬虫https://github.com/WebMole/Micro-Crawler这是一个爬虫Web应用程序,与node.js运行。 我无法弄清楚如何打开这个应用程序,我下载node.js,当我编写安装npm和安装bower到node.js命令行时,什么也没有发生。 此外,我不知道如何启动后,安装应用程序 请帮帮我

错误:无法在node.js中find模块

首先,这不是重复的。 我search了许多问题,但没有find答案,专门安装pagedown。 这是我的第一个模块。 我以pipe理员身份运行Node.js命令提示符,并运行此命令。 > var pagedown = require("pagedown"); 这里是错误日志: Error: Cannot find module 'pagedown' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at repl:1:16 at REPLServer.self.eval (repl.js:110:21) at repl.js:249:20 at REPLServer.self.eval (repl.js:122:7) at Interface.<anonymous> (repl.js:239:12) at Interface.emit (events.js:95:17) 我正在使用Windows。 工作目录:AppData \ Roaming \ npm \ < – 空文件夹

在Windows上全局安装npm模块

我已经在我的Windows 8机器上安装了节点,即使我全局安装了一个模块,我的代码也找不到该模块。 C:\Windows\system32>npm -g install connect connect@3.2.0 C:\Users\Abhishek\AppData\Roaming\npm\node_modules\connect ├── utils-merge@1.0.0 ├── parseurl@1.3.0 ├── debug@2.0.0 (ms@0.6.2) └── finalhandler@0.2.0 (escape-html@1.0.1) C:\Windows\system32>d: D:\>cd myapps\todo D:\myapps\todo>node server.js module.js:340 throw err; ^ Error: Cannot find module 'connect' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (D:\myapps\todo\server.js:1:77) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load […]

当我做'npm install'的时候,npm在做什么? – 为什么所有这些请求都被运行,而不是被caching在我的机器上?

我是新来的npm ,但是每当我运行npm install在任何基于节点的项目上,我得到的github,似乎至less认真运行了大约1分钟,无论package.json是多么简单,滚动数百,如果不是这样在控制台中的数千行… npm http 304 https://registry.npmjs.org/string_decoder npm http 304 https://registry.npmjs.org/isarray npm http GET https://registry.npmjs.org/depd npm http 304 https://registry.npmjs.org/depd npm http GET https://registry.npmjs.org/xtend npm http 304 https://registry.npmjs.org/xtend npm http GET https://registry.npmjs.org/js-base64 npm http GET https://registry.npmjs.org/source-map npm http 304 https://registry.npmjs.org/source-map … 我认为这些必须是正在安装的模块的依赖关系? 如果是这样,他们是否在本地安装这个项目? 有没有一种方法可以使这些依赖types的查找在我的机器上只存储一次,以节省空间,并减less这个过程所花费的时间?

在用npm安装后找不到命令

预先感谢您看我的文章! 主要问题: 当我从命令行调用它时,我需要做些什么来获取http-server? 我觉得这个问题已经显示出我的linux无能。 如果我想从头开始使用node和home brew,那么在继续之前,我需要删除哪些文件和目录(或者确保它们已经被卸载命令删除)? 提前致谢! 背景 之后我想我已经修复了家庭冲煮(OS X 10.10使用了更新版本的Ruby),我试图在收到消息-bash: http-server: command not found后,尝试用npm重新安装http-server。 所以我运行sudo npm install -g http-server 。 然后我得到一个包含npm http GET https://registry/npmjs.org/和npm http 304 https://registry/npmjs.org/ 。 后面是~.node/bin/http-server -> ~.node/lib/node_modules/http-server/bin/http-server' and 'http-server@0.7.3 ~.node/lib/node_modules/http-server 。 笔记 我发现这个/usr/local/bin/http-server@ ,我相信这是http-server的符号链接。 看来,链接http-server -> ../lib/node_modules/http-server/bin/http-server不存在,我不明白为什么。 文件夹/usr/local/lib/node_modules/http-server确实有0.6.1和0.7.3 目录0.7.3只有一个package目录,后面跟着一个package.json文件。 我很困惑,因为我期望这不仅仅包含一个package.json。 我相信brew是正确安装的,因为which brew会提供/usr/local/bin/brew 另外,我得到了brew -v Homebrew 0.9.5 which npm给出/usr/local/bin/npm (节点也是这样) npm […]