-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Unable to deploy Parse Server to Heroku #7090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The same error was still thrown even if I changed NODE_MODULES_CACHE=false. |
Looks like Heroku tried to use Node 15. Can you specify a specific Node version in your package.json -> engines -> node?
|
Thanks @dplewis. |
The test suite runs against Node 10 and Node 12. Node 14 is the active LTS (Long Term Support) version and this repo works for it. The current Node version is 15 was released 2 months ago. Usually the new Node versions are released for 6 Months to allow developers enough time to add support before it is moved into LTS. |
Many thanks @dplewis |
I hate to revive a closed thread, but I'm running into this exact issue using npm 7.5.4 and node 14. Could this an issue with the new major version of npm? I'm currently using EDIT: Removing |
Please see the Node.js compatibility table and ensure that you are using a compatible version. If the issue still exists, you could search through existing issues and if you cannot find a solution, you could open a new issue and fill out a new issue template. |
Hi guys, I am also getting this issue. I am using NodeJS 14 and NPM 7. I only started getting errors once I switched to NPM 7, npm install fails:
|
@stage88 Are you getting these errors related to Parse Server or Parse Dashboard? If it is Parse Dashboard, please take a look at parse-community/parse-dashboard#1633. Parse Dashboard currently does not install with npm 7. |
Ok, so according to this page https://github.com/npm/rfcs/blob/latest/implemented/0021-reduce-lifecycle-script-environment.md, This script here https://github.com/graphql/graphiql/blob/v0.6.12/resources/prepublish.sh depends on it and it fails... sigh I tried setting it manually |
Oh, I see, it is Parse Dashboard. Ok thanks, sorry... |
New Issue Checklist
Issue Description
Deployment of my Parser Server to Heroku stopped working due to the following error on the console.
I have a Parse Server web app deployed on Heroku. It has been updated for a few months though. After I updated the cloud code in main.js, I tried to push the changes to Heroku but received the following error message. Building of web app failed. I am unable to tell if this was the issue with Heroku or the current version of Parse Server.
_remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): >=4.3
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version >=4.3...
remote: Downloading and installing node 15.4.0...
remote: Using default npm version: 7.0.15
remote:
remote: -----> Restoring cache
remote: Cached directories were not restored due to a change in version of node, npm, yarn or stack
remote: Module installation may take longer for this build
remote:
remote: -----> Installing dependencies
remote: Installing node modules
remote: npm ERR! code 1
remote: npm ERR! git dep preparation failed
remote: npm ERR! command /tmp/build_6934a37f/.heroku/node/bin/node /tmp/build_6934a37f/.heroku/node/lib/node_modules/npm/bin/npm-cli.js install --cache=/tmp/npmcache.Hlup5/_cacache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
remote: npm ERR! > codemirror-graphql@0.6.12 prepublish
remote: npm ERR! > . ./resources/prepublish.sh
remote: npm ERR! [eval]:1
remote: npm ERR! process.exit(().original.length && ().original[0].indexOf('pu') === 0)
remote: npm ERR! ^
remote: npm ERR!
remote: npm ERR! SyntaxError: Unexpected token ')'
remote: npm ERR! at new Script (node:vm:101:7)
remote: npm ERR! at createScript (node:vm:262:10)
remote: npm ERR! at Object.runInThisContext (node:vm:310:10)
remote: npm ERR! at node:internal/process/execution:77:19
remote: npm ERR! at [eval]-wrapper:6:22
remote: npm ERR! at evalScript (node:internal/process/execution:76:60)
remote: npm ERR! at node:internal/main/eval_string:23:3
remote: npm ERR!
remote: npm ERR!
remote: npm ERR!
remote: npm ERR! Only Travis CI can publish to NPM.
remote: npm ERR! Ensure git is left is a good state by backing out any commits and deleting any tags.
remote: npm ERR! Then read CONTRIBUTING.md to learn how to publish to NPM.
remote: npm ERR!
remote: npm ERR!
remote: npm ERR!
remote: npm ERR! npm ERR! code 1
remote: npm ERR! npm ERR! path /tmp/npmcache.Hlup5/_cacache/tmp/git-clone-5caf527a
remote: npm ERR! npm ERR! command failed
remote: npm ERR! npm ERR! command sh -c . ./resources/prepublish.sh
remote: npm ERR!
remote: npm ERR! npm ERR! A complete log of this run can be found in:
remote: npm ERR! npm ERR! /tmp/npmcache.Hlup5/_cacache/_logs/2020-12-22T05_52_41_487Z-debug.log
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.Hlup5/logs/2020-12-22T05_52_41_912Z-debug.log
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: Some possible problems:
remote:
remote: - Dangerous semver range (>) in engines.node
remote: https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to mywebapp-parse-server.
remote:
To https://git.heroku.com/MY_APP.git
! [remote rejected] master -> master (pre-receive hook declined)
My package.json file looks like:
{
"name": "parse-server-example",
"version": "1.4.0",
"description": "An example Parse API server using the parse-server module",
"author": "AC",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://git.heroku.com/{MY_APP}.git"
},
"license": "MIT",
"dependencies": {
"cookie-parser": "~1.4.3",
"debug": "~2.6.9",
"express": "~4.16.0",
"http-errors": "~1.6.2",
"morgan": "~1.9.0",
"parse-dashboard": "^1.2.0",
"parse-server": "",
"cors": "",
"cron": "^1.8.2"
},
"scripts": {
"start": "node index.js"
},
"engines": {
"node": ">=4.3"
}
}
Steps to reproduce
Actual Outcome
Push to Heroku rejected, failed to compile Node.js app.
Expected Outcome
Failing Test Case / Pull Request
Environment
Heroku
Server
Database
Client
Logs
The text was updated successfully, but these errors were encountered: