- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我有一个托管在 Heroku 上的 Node.js 应用程序。每次我执行 git push heroku
时都会出现以下错误:
Counting objects: 14, done.
Delta compression using up to 6 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (12/12), 1.20 KiB, done.
Total 12 (delta 8), reused 0 (delta 0)
-----> Node.js app detected
-----> Resolving engine versions
Using Node.js version: 0.6.20
Using npm version: 1.2.12
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
npm http GET https://registry.npmjs.org/pg/0.6.15
npm http GET https://registry.npmjs.org/socket.io
npm http 200 https://registry.npmjs.org/pg/0.6.15
npm http GET https://registry.npmjs.org/pg/-/pg-0.6.15.tgz
npm http 200 https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io/-/socket.io-0.9.13.tgz
npm http 200 https://registry.npmjs.org/pg/-/pg-0.6.15.tgz
npm http 200 https://registry.npmjs.org/socket.io/-/socket.io-0.9.13.tgz
npm http GET https://registry.npmjs.org/socket.io-client/0.9.11
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/base64id/0.1.0
npm http GET https://registry.npmjs.org/redis/0.7.3
npm http GET https://registry.npmjs.org/generic-pool/1.0.9
npm http 200 https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz
npm http 200 https://registry.npmjs.org/base64id/0.1.0
npm http GET https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz
npm http 200 https://registry.npmjs.org/generic-pool/1.0.9
npm http GET https://registry.npmjs.org/generic-pool/-/generic-pool-1.0.9
.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/0.9.11
npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-clie
nt-0.9.11.tgz
npm http 200 https://registry.npmjs.org/redis/0.7.3
npm http GET https://registry.npmjs.org/redis/-/redis-0.7.3.tgz
npm http 200 https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz
npm http 200 https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz
npm http 200 https://registry.npmjs.org/generic-pool/-/generic-pool-1.0.9
.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-clie
nt-0.9.11.tgz
npm http 200 https://registry.npmjs.org/redis/-/redis-0.7.3.tgz
> pg@0.6.15 install /tmp/build_36us8733h7kkr/node_modules/pg
> node-waf configure build || (exit 0)
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /tmp/node-node-nNUw
Checking for program pg_config : /usr/bin/pg_config
'configure' finished successfully (0.058s)
Waf: Entering directory `/tmp/build_36us8733h7kkr/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/Release/src/binding_1.o
[2/2] cxx_link: build/Release/src/binding_1.o -> build/Release/binding.no
de
Waf: Leaving directory `/tmp/build_36us8733h7kkr/node_modules/pg/build'
'build' finished successfully (0.492s)
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 200 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/active-x-obfuscator/-/active-x-ob
fuscator-0.0.1.tgz
npm http 200 https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1
.4.2.tgz
npm http 200 https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/ws/-/ws-0.4.25.tgz
npm http 200 https://registry.npmjs.org/active-x-obfuscator/-/active-x-ob
fuscator-0.0.1.tgz
npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1
.4.2.tgz
npm http 200 https://registry.npmjs.org/ws/-/ws-0.4.25.tgz
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
npm http 200 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 200 https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/options/-/options-0.0.3.tgz
npm http 200 https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz
npm http 200 https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 200 https://registry.npmjs.org/options/-/options-0.0.3.tgz
npm http 200 https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
> ws@0.4.25 install /tmp/build_36us8733h7kkr/node_modules/socket.io/node_
modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/tmp/build_36us8733h7kkr/node_modules/socket.io
/node_modules/socket.io-client/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory `/tmp/build_36us8733h7kkr/node_modules/socket.io/
node_modules/socket.io-client/node_modules/ws/build'
npm ERR! cb() never called!
npm ERR! not ok code undefined
npm ERR! cb() never called!
npm ERR! not ok code 1
! Failed to install --production dependencies with npm
! Heroku push rejected, failed to compile Node.js app
To git@heroku.com:still-chamber-1286.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:still-chamber-1286.git'
错误在最后几行:
npm ERR! cb() never called!
npm ERR! not ok code undefined
npm ERR! cb() never called!
npm ERR! not ok code 1
! Failed to install --production dependencies with npm
! Heroku push rejected, failed to compile Node.js app
To git@heroku.com:still-chamber-1286.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:still-chamber-1286.git'
我之前将代码推送到 Heroku 没有任何问题;直到星期一才出现这个错误。
我在网上看到过类似的帖子,其中提到了略有不同的错误,但还没有看到有 的帖子! [remote denied] master -> master (pre-receive hook denied)
before.
最佳答案
如果你有 npm 5 或更高版本,请先试试这个:
$ sudo npm cache verify
否则:
$ sudo npm cache clean
我的 node 和 npm 版本是:
$ node -v
v0.10.0
$ npm -v
1.2.14
关于node.js - npm ERR cb() 从未调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15393821/
我正在使用npm v5.3.0。 现在,我想将npm更新到v5.4.1。要执行此操作,请在终端中键入以下内容: npm install -g npm 没有任何错误。但是,当我键入npm -v时,得到的
我已经使用 vue-cli 两个星期了,直到今天一切正常。我在本地建立这个项目。 https://drive.google.com/open?id=0BwGw1zyyKjW7S3RYWXRaX24tQ
有什么方法可以更改或重置全局 npm 注册表。 感谢您的帮助。 最佳答案 在终端中运行以下命令以恢复到默认注册表 npm config set registry https://registry.np
查看 npm 的 documentation , 'i' 是 'install' 的别名,是否有任何情况下最好使用完整的 'npm install'? 最佳答案 两者之间没有具体区别。这只是一个懒惰的
目前,每次将更改推送到 GIT 存储库时,我都会发布新版本的 NPM 包。我的大部分更改只是愚蠢的补丁。我使用 NPM 作为工具,在我的许多项目中启用版本控制和代码重用。经过一个月的工作,我已经完成了
我运行的时候总是报错 npm install 谁知道怎么解决 npm ERR! Darwin 13.0.0 npm ERR! argv "/usr/local/bin/node" "/usr/b
“npm uninstall packageName”删除包并更新 package.json 文件。 但是来自 npm 文档 - To remove a package from the depend
我的背景更熟悉 composer .我收到 gulp (等)进行构建过程和学习 node以及如何使用 npm我走的时候。 很奇怪(再次来自 composer 背景)composer.lock默认情况下
我看到的许多 npm 模块名称前面都添加了技术名称,例如 react-native 或 jquery 等。由于我们已经在 package.json 文件中提供了关键字,因此遵循此约定有什么好处。我问这
我检查了 connect-privkey-to-provider模块在依赖项中。但是,它一直在说 模块 'connect-privkey-to-provider' 是无关的 npm 和 找不到模块 '
我正在进行持续集成并发现了 npm ci命令。 我不知道在我的工作流程中使用此命令有什么优势。 速度更快吗?这会让测试变得更难吗?好吗? 最佳答案 来自the official documentati
我有一个要发布到 NPM 的包,其中还包含如下所示的演示目录: . +-- demo | +-- src | | +-- main.js | +-- package.json +--
如果我打开集成终端并运行 npm -v 它会起作用。 但是,如果我直接从 NPM SCRIPTS 运行它,它就不起作用。 评论中要求的更多详细信息 //由 Fogmeister 编辑 我也有这个问题,
我正在尝试安装 gulp,当我写 npm install 时我得到了这个问题: npm ERR! code 1 npm ERR! path D:\www\wegrow\node_modules\nod
这个问题已经有答案了: npm test --codecoverage doesn't generate report (3 个回答) 已关闭 4 年前。 当我执行npm test --code-co
我能够运行 npm start 和 npm run start 命令。我用过create-react-app创建我的应用程序。为了在 CSS 模块中进行配置更改,我想运行 npmject 但它会抛出错
我正在使用npm run script执行“构建”和“测试”等任务。 例如,我的 package.json 如下所示: { "name": "fulfillment-service", "ve
我第一次将 npm 模块添加到我的项目中(jshint、optimg、jpgo)。我注意到有些项目,当我做 npm 运行 [名称] ,给出“sh: [name]: command not found”
我已经在 Windows 上安装了 Ubuntu Bash。我已经有 nodejs和 npm在我的 Windows 机器上 C:\Program Files\nodejs .在 Windows 的 b
我正在尝试运行 npm install bitgo命令但在终端上出现以下错误, npm ERR! code EMFILE npm ERR! syscall spawn git npm ERR! pat
我是一名优秀的程序员,十分优秀!