Tag: npm

NodeJS给出在运行Handlebars时找不到模块“./parser”错误

我已经写了一个Handlebars模板,并成功地在浏览器中工作。 作为下一步,我想使用Handlebars预编译器 ,这是一个NodeJS模块。 我在本地下载了NodeJS的Handlebars和所有的依赖关系(no -g)。 但我似乎无法通过这一步: c:\node_modules> node > require("handlebars"); Error: Cannot find module './parser' … at Object.<anonymous> (C:\node_modules\handlebars\lib\handlebars\compiler\base.js:1:80) … 我打开base.js,第1行如下所示: var handlebars = require("./parser"); 但是在包含base.js的文件夹( 见github上的文件夹 )或任何父文件夹中没有parser.js。 Handlebars的NPM页面没有提到我可以find的对parser.js的依赖。 我不知道我错过了一个明显的步骤,或者如果我应该生成这个文件。 任何帮助或想法?

安装业力testing运行器时出错

当我试图在Windows 7上安装karma ,我收到以下消息 MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua l Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\user\AppData\Roaming\npm\node_modules\karma\ node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bind ing.sln] 我安装了.NET Framework 2.0 […]

curlhttp://npmjs.org/install.sh | sh在Cygwin失败

我无法在cygwin上安装npm。 我已经安装了节点v0.4.12,它应该是cygwin上nodejs的最后支持版本。 这是我得到的错误: curl http://npmjs.org/install.sh | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 85 0 85 0 0 344 0 –:–:– –:–:– –:–:– 904 sh: line 1: syntax error near unexpected token `newline' sh: line 1: `<html>Moved: <a href="https://npmjs.org/install.sh">https://npmjs.org/install.sh</a>' 请帮我解决这个问题。 TIA。

npm安装zmq的问题

我正在做npm安装zmq,但卡住在奇怪的错误,请参阅下面 C:\ Users \ Administrator> npm install zmq MSBUILD:错误MSB4132:工具版本“2.0”无法识别。 可用的LS版本是“4.0”。 gyp ERR! 堆栈错误: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe失败,退出代码:1 gyp ERR! 在ChildProcess.onExit(C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ lib \ build.js:267:23) gyp ERR! 在ChildProcess.EventEmitter.emit(events.js:98:17) gyp ERR! 在Process.ChildProcess._handle.onexit(child_process.js:789:12) 使用Googlesearch,但没有运气。 这是一个全新的安装在Windows Server 2012.和ZMQ已经安装使用Windows MSI安装程序,但我想在nodejs下使用ZMQ所以做NPM。 我认为msbuild是失败的,因为节点假设版本2的.net框架,但安装.net版本是4.任何一个请指导我如何解决这个问题 – 谢谢 关于紫山

执行“npm install”时出错

我是新来的。 我不知道这是否必须认真对待,或者我可以继续我所要做的。 只有在这里,我可以发布它的全部细节。 npm ERR! error installing express@3.3.5 npm ERR! error rolling back express@3.3.5 Error: UNKNOWN, unknown error '/home/ubuntu/vengit/node_modules/express' npm ERR! Unsupported npm ERR! Not compatible with your version of node/npm: connect@2.8.5 npm ERR! Required: {"node":">= 0.8.0"} npm ERR! Actual: {"npm":"1.1.4","node":"0.6.12"} npm ERR! npm ERR! System Linux 3.2.0-40-virtual npm ERR! command "node" "/usr/bin/npm" "install" npm […]

检查libpam头文件是否可用

在我的Node.js应用程序中,我使用了pamauthentication,我使用的模块需要安装libpam-dev(或者pam-devel),否则将不能编译。 它产生的错误信息不是非常用户友好的,许多人不会为阅读文档而烦恼。 我想使用NPM中的预安装钩子检查头是否可用,如果没有,显示一个友好的错误,然后杀死NPM,然后再尝试安装模块。 我知道如何杀死NPM,而不是如何检查pam头是否可用。 解决scheme应该是distro-agnostic。

Node.js:npm bin -g命令

有人可以向我解释npm bin -g命令和npm bin命令之间的区别吗? 实际上,当我inputnpm bin我得到了c:\wamp\www\node\node_modules\.bin 。 当我inputnpm bin -g (应该是“global”)时,我得到了c:\users\shmuli\appdata\roaming\npm 。 我假设“全局”意味着我可以启动我的程序在CMD中,而不必在它所安装的特定目录中…全局安装有不同于典型安装的安装目录吗? 这是怎么回事?

有没有替代npmzip?

正如@NS Gopikrishnan在这个问题中提到的那样,有一个npmzip工具,我们可以使用这个工具创buildnpm安装包,其中包含该包的所有依赖关系。 不幸的是,npmzip 不再可用 。 我会对创build包含所有依赖关系的脱机安装程序包非常感兴趣。 有谁知道的替代npmzip这样做对我?

meteor,npm和请求

我使用meteor,我运行npm安装请求来访问该库。 一切似乎安装正确,但是当我运行meteor服务器,然后我得到以下错误。 有没有关于为什么这个或如何解决它的话? 谢谢。 While building the application: node_modules/request/node_modules/node-uuid/test/test.html:1: bad formatting in HTML template node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js:1:15: Unexpected token ILLEGAL node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js:1:15: Unexpected token ILLEGAL 以供参考: 的test.html <html> <head> <style> div { font-family: monospace; font-size: 8pt; } div.log {color: #444;} div.warn {color: #550;} div.error {color: #800; font-weight: bold;} </style> <script src="../uuid.js"></script> </head> <body> <script src="./test.js"></script> </body> </html> run.js(相同) […]

在树莓派上永远安装node.js / npm的问题

版本 Linux distro and version: Raspbian GNU/Linux 7 (wheezy)" Python: 2.7.3 Nodejs: v0.10.22 NPM: 1.3.15 每次我尝试在全球范围内永远安装在我的Raspberry Pi上时,它就会失败。 错误如下所示。 sudo npm install forever -g npm http GET https://registry.npmjs.org/forever npm http 304 https://registry.npmjs.org/forever npm http GET https://registry.npmjs.org/utile/0.1.7 npm http GET https://registry.npmjs.org/winston/0.7.1 npm http GET https://registry.npmjs.org/colors/0.6.0-1 npm http GET https://registry.npmjs.org/cliff/0.1.8 npm http GET https://registry.npmjs.org/flatiron/0.3.5 npm http GET https://registry.npmjs.org/forever-monitor/1.2.3 […]