Skip to content
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

Deployment on Heroku does not work when using 17 NodeJS #286

Closed
dgbkn opened this issue Nov 10, 2021 · 2 comments
Closed

Deployment on Heroku does not work when using 17 NodeJS #286

dgbkn opened this issue Nov 10, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@dgbkn
Copy link

dgbkn commented Nov 10, 2021

this is the build log

Activity Feed Build LogID 0fbf21d7-dcd8-4283-9846-6fd986c7280f
-----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/nodejs
-----> Node.js app detected

-----> Creating runtime environment

   NPM_CONFIG_LOGLEVEL=error
   NODE_VERBOSE=false
   NODE_ENV=production
   NODE_MODULES_CACHE=true

-----> Installing binaries
engines.node (package.json): >=12.x
engines.npm (package.json): unspecified (use default)

   Resolving node version >=12.x...
   Downloading and installing node 17.1.0...
   Using default npm version: 8.1.2

-----> Restoring cache
Cached directories were not restored due to a change in version of node, npm, yarn or stack
Module installation may take longer for this build

-----> Installing dependencies
Installing node modules

   > torrent-stream-server@1.9.0 postinstall
   > [ ! -d frontend/src ] || npm --prefix frontend install && npm run build
   
   
   added 2105 packages, and audited 2106 packages in 3m
   
   157 packages are looking for funding
     run `npm fund` for details
   
   62 vulnerabilities (19 moderate, 41 high, 2 critical)
   
   To address issues that do not require attention, run:
     npm audit fix
   
   To address all issues (including breaking changes), run:
     npm audit fix --force
   
   Run `npm audit` for details.
   
   > torrent-stream-server@1.9.0 build
   > npm run build-backend && npm run build-frontend
   
   
   > torrent-stream-server@1.9.0 build-backend
   > tsc
   
   
   > torrent-stream-server@1.9.0 build-frontend
   > npm run --prefix frontend build
   
   
   > torrent-stream-server-frontend@1.9.0 build
   > REACT_APP_VERSION=$npm_package_version SKIP_PREFLIGHT_CHECK=true react-scripts build
   
   Creating an optimized production build...
   Error: error:0308010C:digital envelope routines::unsupported
       at new Hash (node:internal/crypto/hash:67:19)
       at Object.createHash (node:crypto:130:10)
       at module.exports (/tmp/build_89575f14/frontend/node_modules/webpack/lib/util/createHash.js:135:53)
       at NormalModule._initBuildHash (/tmp/build_89575f14/frontend/node_modules/webpack/lib/NormalModule.js:417:16)
       at handleParseError (/tmp/build_89575f14/frontend/node_modules/webpack/lib/NormalModule.js:471:10)
       at /tmp/build_89575f14/frontend/node_modules/webpack/lib/NormalModule.js:503:5
       at /tmp/build_89575f14/frontend/node_modules/webpack/lib/NormalModule.js:358:12
       at /tmp/build_89575f14/frontend/node_modules/loader-runner/lib/LoaderRunner.js:373:3
       at iterateNormalLoaders (/tmp/build_89575f14/frontend/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
       at iterateNormalLoaders (/tmp/build_89575f14/frontend/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
       at /tmp/build_89575f14/frontend/node_modules/loader-runner/lib/LoaderRunner.js:236:3
       at runSyncOrAsync (/tmp/build_89575f14/frontend/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
       at iterateNormalLoaders (/tmp/build_89575f14/frontend/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
       at Array.<anonymous> (/tmp/build_89575f14/frontend/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
       at Storage.finished (/tmp/build_89575f14/frontend/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
       at /tmp/build_89575f14/frontend/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
   /tmp/build_89575f14/frontend/node_modules/react-scripts/scripts/build.js:19
     throw err;
     ^
   
   Error: error:0308010C:digital envelope routines::unsupported
       at new Hash (node:internal/crypto/hash:67:19)
       at Object.createHash (node:crypto:130:10)
       at module.exports (/tmp/build_89575f14/frontend/node_modules/webpack/lib/util/createHash.js:135:53)
       at NormalModule._initBuildHash (/tmp/build_89575f14/frontend/node_modules/webpack/lib/NormalModule.js:417:16)
       at /tmp/build_89575f14/frontend/node_modules/webpack/lib/NormalModule.js:452:10
       at /tmp/build_89575f14/frontend/node_modules/webpack/lib/NormalModule.js:323:13
       at /tmp/build_89575f14/frontend/node_modules/loader-runner/lib/LoaderRunner.js:367:11
       at /tmp/build_89575f14/frontend/node_modules/loader-runner/lib/LoaderRunner.js:233:18
       at context.callback (/tmp/build_89575f14/frontend/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
       at /tmp/build_89575f14/frontend/node_modules/babel-loader/lib/index.js:59:103 {
     opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
     library: 'digital envelope routines',
     reason: 'unsupported',
     code: 'ERR_OSSL_EVP_UNSUPPORTED'
   }
   
   Node.js v17.1.0
   npm ERR! code 1
   npm ERR! path /tmp/build_89575f14
   npm ERR! command failed
   npm ERR! command sh -c [ ! -d frontend/src ] || npm --prefix frontend install && npm run build
   
   npm ERR! A complete log of this run can be found in:
   npm ERR!     /tmp/npmcache.qKDsC/_logs/2021-11-10T03_59_15_485Z-debug.log

-----> 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
Build finished

@KiraLT KiraLT changed the title unable to deploy new update to heroku Deployment on Heroku does not work when using 17 NodeJS Nov 26, 2021
@KiraLT KiraLT added the bug Something isn't working label Nov 26, 2021
@RudranBera
Copy link

please solve it
i am facing the same problem

@KiraLT KiraLT closed this as completed in 00cc61c Dec 21, 2021
@KiraLT
Copy link
Owner

KiraLT commented Dec 21, 2021

This issue is due to facebook/create-react-app#11562 and affects only NodeJS 17. I added different build command on NodeJS that ignores SSL errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants