Heroku拒绝了Parse Server应用程序构建

时间:2017-11-04 18:42:54

标签: node.js heroku parse-platform npm parse-server

我正努力在Heroku上为我的Parse Server成功执行构建。 该应用程序在本地工作,在过去,它在Heroku上运行良好。但是最近,Heroku通过拒绝它而给出了新推的错误。

-----> Node.js app detected
-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  >=4.3
       engines.npm (package.json):   unspecified (use default)

       Resolving node version >=4.3...
       Downloading and installing node 9.0.0...
       Detected package-lock.json: defaulting npm to version 5.x.x
       Bootstrapping npm 5.x.x (replacing 5.5.1)...
       npm 5.5.1 installed
-----> Restoring cache
       Skipping cache restore (new-signature)
-----> Building dependencies
       Installing node modules (package.json + package-lock)
       /tmp/build_4728241b3b8410ea42914696b57d437a/project-parse-server-864c0b329340b49b893199714bebc832e23ddaef/.heroku/node/bin/node[369]: ../src/node_zlib.cc:430:static void node::{anonymous}::ZCtx::Init(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
       1: node::Abort() [npm]
       2: node::Assert(char const* const (*) [4]) [npm]
       3: 0x1251ea1 [npm]
       4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [npm]
       5: 0xb74c3c [npm]
       6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [npm]
       7: 0xb4fc2c842fd
/app/tmp/buildpacks/19862b8792e84bd8421ded4660b92dfd1c41d92e19ac0b38c90301adc8ae3e0bd512fa01998af18fc2f0d31a157e9c82e8fdceba1a05e5d29adb8dc2bfaf08e1/lib/dependencies.sh: line 85:   369 Aborted                 npm install --unsafe-perm --userconfig $build_dir/.npmrc 2>&1
-----> Build failed

       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys

       Some possible problems:

       - Dangerous semver range (>) in engines.node
       https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version

       Love,
       Heroku

 !     Push rejected, failed to compile Node.js app.
 !     Push failed

1 个答案:

答案 0 :(得分:3)

我在Heroku上遇到与npm i相同的问题

将其添加到package.json,它应该有效

&#13;
&#13;
"engines": {
    "node": "8.x",
    "npm": ">= 3"
}
&#13;
&#13;
&#13;