Tag: npm

Amazon Elastic Beanstalk节点和npm非标准安装位置

Amazon Beanstalk将节点和npm安装到真正模糊的地方 – 我不确定如果EB决定使用更新版本的节点,这会导致我的应用程序中断,它们不会改变。 这些是node和npm的位置: /opt/elasticbeanstalk/node-install/node-v0.8.24-linux-x64/bin/node /opt/elasticbeanstalk/node-install/node-v0.8.24-linux-x64/bin/npm 我很担心0.8.24部分发生了变化,我不想在cron或monit脚本中寻找通常只是/usr/bin/XXX 。 我如何获得这些可执行文件的一致的文件path? 为什么EB做到这一点? 作为参考,我尝试在.ebextensions/app.config设置NodeVersion选项,它对安装位置没有影响。

Heroku错误H14(没有web进程运行)

很确定有些人之前遇到过这个问题。 遵循所有的说明来设置节点和NPM。 当推到heroku没有错误。 但是当我打开应用程序,它显示“应用程序错误” heroku ps 回报 Process State Command ——- ——— ———— main.1 up for 1m node main.js 而 heroku logs 回报 Error H14 (No web processes running) -> GET mewtwo.herokuapp.com/ dyno= queue= wait= service= status=503 bytes= 我试着用heroku restart启动应用程序,但仍然得到相同的错误。 谷歌周围,没有其他的解决scheme,而不是heroku restart 。 任何人试过其他方法? 答:(我把它放在这里,因为我的代表太低,无法发布答案) 好吧,终于自己想出来了。 显然在Procfile中,我宣称 main: node main.js 但是Heroku使用 web: node main.js 我认为命名可以是任何你想要的,但实际上它是严格的,至less现在,你需要使用networking来工作(heroku并没有强调这一点 […]

npm安装提供未经授权的名称或密码是不正确的错误

当我尝试安装水龙头使用 npm install tap 我得到以下错误: npm ERR! Error: unauthorized Name or password is incorrect.: tap 这是整个回应: npm http GET https://registry.npmjs.org/tap npm http 401 https://registry.npmjs.org/tap npm ERR! Error: unauthorized Name or password is incorrect.: tap npm ERR! at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:253:14) npm ERR! at Request.init.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/main.js:120:22) npm ERR! at Request.EventEmitter.emit (events.js:91:17) npm ERR! at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/main.js:648:16) npm […]

你如何使用npm脚本运行一个js文件?

我不能让npm工作。 我的package.json文件有 "scripts": { "build": "build.js" } 我有一个build.js文件在只是console.logs相同的文件夹。 当我跑步 npm run build 我得到错误 The system cannot execute the specified program. npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build" npm ERR! node v4.1.1 npm ERR! npm v3.3.5 npm ERR! code ELIFECYCLE 如果我移动build.js文件并将我的package.json文件更改为具有子文件夹 "scripts": { "build": "build/build.js" } 那么我得到的错误 'build' is not […]

清除caching后npm不工作

在清除caching之前 npm cache clear npm工作正常。 清除caching后,它不工作。 下面的错误日志表明与互联网连接的问题,但互联网连接就好了。 这个问题不仅发生在凉亭,而且还发生在任何模块上。 以下是过程的输出: > sudo npm install -g bower Password: npm http GET > https://registry.npmjs.org/bower npm http GET > https://registry.npmjs.org/bower npm http GET > https://registry.npmjs.org/bower npm ERR! network connect ETIMEDOUT > npm ERR! network This is most likely not a problem with npm itself npm > ERR! network and […]

顺序运行NPM脚本

假设我有 "scripts": { "pre-build": "echo \"Welcome\" && exit 1", "build_logic": "start cmd.exe @cmd /k \"yo esri-appbuilder-js:widget && exit 1\"", "post_build": "start C:\\WebAppBuilderForArcGIS\\startupShortcut", "exit" : "start cmd.exe @cmd /k \"echo \"goodbye\" && exit 1\"" }, 我可以运行什么NPM命令让所有这些脚本顺序启动。 当我使用前/后修复时,他们顺序启动,但他们不等待父母脚本完成之前执行。 我假设唯一的解决scheme是这样的: 我如何获得吞噬任务在async.series辅助函数中触发shell命令时按顺序触发? ? 我知道这可以用Gulp来完成,但是我现在想坚持NPM来探索它的能力。 谢谢你的帮助!

Grunt usemin和usemin准备多个目标

从usemin问题看来,usemin和useminPrepare支持最新版本中的多个目标: useminPrepare支持: https://github.com/yeoman/grunt-usemin/pull/162 https://github.com/yeoman/grunt-usemin/pull/206 usemin支持: https://github.com/yeoman/grunt-usemin/issues/57 我试过用以下configuration使用多个目标: useminPrepare: { foo: { dest: 'fooDist', src: ['foo/index.html'] }, bar: { dest: 'barDist', src: ['bar/index.html'] } }, usemin: { foo: { options: { assetsDirs : ['fooDist'] }, html: ['fooDist/**/*.html'], css: ['fooDist/styles/**/*.css'] }, bar: { options: { assetsDirs : ['barDist'] }, html: ['barDist/**/*.html'], css: ['barDist/styles/**/*.css'] } }, 但我收到以下错误: 运行“usemin:foo”(usemin)任务警告:不支持的模式:foo […]

如何使Grunt Deploy使用全局NPM模块而不是本地模块

首先,我对npm和grunt很新。 我们有一个项目,我们正在使用Grunt来编译和生成输出文件。 我试图设置我们的生成服务器使用Grunt生成输出文件。 我们正在使用Windows与TFS源代码控制,并由于它的260个字符的path限制 ,我们无法检查到源代码pipe理( 因为它单独使用230个字符安装path )的grunt-bower-task模块。 当我从我的项目目录运行npm install时 ,它工作正常,并将以下必需模块安装到我的项目目录中的node_modules文件夹中: 咕噜 咕噜鲍尔任务 咕噜-的contrib罗盘 咕噜-的contrib-CONNECT 咕噜-的contrib-jshint 咕噜-的contrib-requirejs 咕噜-的contrib手表 然后当我从我的项目目录运行grunt部署一切都按预期工作。 虽然我可以简单地使运行npm install构build过程的一部分,但我不愿意,因为它需要几分钟时间才能下载所有文件,而且我不希望我们的构build依赖于可用的外部Web服务。 我已经看到, 您可以在本地或全局安装模块 ,所以我希望能够在生成服务器上全局安装模块,以便它们不需要直接在项目目录内的node_modules文件夹中运行grunt部署 。 我已经运行了npm install -g ,以及上面列出的每个模块的npm install -g [module] ,以及npm install -g grunt-cli 。 如果我做npm前缀-g,它会告诉我全局模块目录是C:\ Users [我的用户] \ AppData \ Roaming \ npm ,当我查看该目录的node_modules文件夹时,我看到所有的模块。 但是,当我运行grunt部署它抱怨: 致命错误:无法find本地咕噜声 如果我只包含* node_modules \ grunt *目录,那么我仍然得到这些错误: 没有find本地Npm模块“grunt-contrib-watch”。 是否安装? […]

更新npm包的自述文件时版本颠簸?

如果我修改npm包的自述文件,我维护,是否需要在package.json中打包版本,并执行另一个npm发布? 还是有另一种方式来更新自述文件没有版本碰撞。

npm卡在fetchMetadata – >networking上

我的npm卡住了很多,无论是从package.json安装的npm还是个别的包。 现在,我甚至不能sudo npm install node-inspector -g 我在ubuntu 16.04上使用node 6.2.1 , npm 3.9.5 npm cache clear没有帮助。 安装需要几个小时或失败。