Tag: npm

meteor安装在packages.json引用的npm包在哪里?

meteor安装npm包后: npm: updating npm dependencies — winston… Npm.require导致模块找不到错误,通过检查代码并通过节点检查器debugging,我发现把一个标准的node_modules文件夹(通过npm install安装)放在我的meteor应用文件夹根目录下的.meteor文件夹中。find它。 然而,当部署到meteor.com或使用任何自动构build包(如Heroku的)这可能是不可能的,我宁愿有一个场景,我可以链接自动下载的模块Npm.require看起来在path。 任何想法在哪里下载软件包? 谢谢

Visual Studio 2013 MySQL模块安装失败

当我试图通过Visual Studio 2013 npm Package Management安装Node.JS MySQL模块时,由于以下错误,安装失败: npm ERR! Failed to parse json npm ERR! Unexpected token 我该如何解决这个问题,或者有另一种方法来做到这一点?

我如何获得HTML快照的工作?

我只是试图运行HTML快照 。 这应该很简单吧? 这是我开始的: npm install html-snapshots 这就是我需要的,对吧? 这是我的snapshots.js文件: var htmlSnapshots = require('html-snapshots'); htmlSnapshots.run({ source: "sitemap.xml", hostname: "localhost", outputDir: "snapshots", outputDirClean: true, selector: "#results-widget" }); 并运行它: node snapshots.js 但是, module.js:340 throw err; ^ Error: Cannot find module '.\robots' 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.module.exports.create (C:\webdev\node_modules\html-snapshots\lib\input-generators\index.js:38:16) at Object.module.exports.run […]

尝试安装npm软件包'libxmljs'时出错

当我尝试安装libxmljs npm软件包时,出现以下错误信息。 $ sudo npm install -g libxmljs npm http GET https://registry.npmjs.org/libxmljs npm http 200 https://registry.npmjs.org/libxmljs npm http GET https://registry.npmjs.org/bindings/1.0.0 npm http 200 https://registry.npmjs.org/bindings/1.0.0 npm http GET https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz > libxmljs@0.8.1 install /usr/lib/node_modules/libxmljs > node-gyp rebuild gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/support/.node-gyp/0.10.23" gyp […]

在具有节点npm的OSX Mavericks上安装topojson

我不能得到topojson通过节点npm(使用sudo)在小牛安装。 我已经安装了Xcode命令行工具,并尝试了各种解决scheme,但没有运气。 这是我的输出: > contextify@0.1.6 install /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/contextify > node-gyp rebuild CXX(target) Release/obj.target/contextify/src/contextify.o cc1plus: error: unrecognized command line option "-arch" make: *** [Release/obj.target/contextify/src/contextify.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit […]

meteorNpm.require()无法在父目录中find文件

我试图让一个废弃的nodejs库在Meteor下工作。 为什么Npm.require('./crypto-js/crypto')能正常工作,但是Npm.require('../convert')会抛出错误Error: Cannot find module '../convert' ? /packages/myPackage/package.js Package.on_use(function (api) { var path = Npm.require('path'); api.add_files(path.join('convert.js'), 'server'); api.add_files(path.join('crypto-js', 'crypto.js'), 'server'); api.add_files(path.join('util.js'), 'server'); }); /packages/myPackage/convert.js myFunc = function() { return true } /packages/myPackage/util.js Crypto = Npm.require('./crypto-js/crypto'); /packages/myPackage/crypto-js/crypto.js var conv = Npm.require('../convert')

在r.js构build文件中加载ngmin失败

我试图在requirejs的ngmin中使用ngmin ,但由于某种原因,我无法使其工作。 我已经通过全局和本地npm安装ngmin和requirejs ,这些选项都不会在onBuildRead()正确加载ngmin 。 我也导出了NODE_PATH ,但是这也没有帮助。 构build文件没有提供隔离问题的钩子函数,但我不是一个nodejs专家,所以我不知道如何进一步解决这个问题。 任何帮助表示赞赏。 ({ mainConfigFile: './static/js/boot.js', baseUrl: './static/js', name: 'boot', include: 'require.js', out: './static/js/main-built.js', normalizeDirDefines: 'all', onBuildRead: function (moduleName, path, contents) { var ngmin = require('ngmin'); console.log(ngmin); // ngmin is undefined return ngmin.annotate(contents); // no method annotate of undefined } })

npm错误安装 – npm ERR! cb()永远不会调用不正确的代码0

Windows 7(64)npm版本1.3.24节点版本0.10.25 当我试图安装凉亭我得到这个错误消息 C:\>npm install bower -g npm http GET https://registry.npmjs.org/bower npm ERR! cb() never called! npm ERR! not ok code 0 我已经尝试过了 npm cache clean 和 npm install – getting another error message Microsoft Windows [版本6.1.7601]版权所有(c)2009 Microsoft Corporation。 版权所有。 C:\ Users \用户andpon> CD / C:\>npm install npm ERR! install Couldn't read dependencies npm ERR! […]

缺lessGulpfile Ubuntu 12.04

/usr/local/lib/node_modules/gulp/bin/gulp:11 throw new Error("Missing Gulpfile"); ^ Error: Missing Gulpfile at Object.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp:11:9) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3 当我尝试使用gulp -v时,出现这个错误。 节点-v(0.10.25)工作正常,npm -v(1.3.24)也是如此。 我跟着他们的github教程,但没有成功。 https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md#getting-started 有人可以帮我吗?

sudo npm install bignum -g:OSError:权限被拒绝

我尝试安装bignum时遇到此错误。 系统信息: nodejs PPA ppa:chris-lea / node.js node -v v0.10.26 npm -v 1.4.3 Ubuntu 12.04 2.6.32-042stab081.5 $ sudo npm install bignum -g npm http GET http://registry.npmjs.org/bignum npm http 304 http://registry.npmjs.org/bignum > bignum@0.6.2 install /usr/lib/node_modules/bignum > node-gyp configure build Traceback (most recent call last): File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module> sys.exit(gyp.script_main()) File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 534, in […]