Nuxt deployment fails
I am trying to deploy my nuxtjs app, however building the app fails.
Here is the error:
#13 4.022 node:internal/crypto/hash:71
#13 4.022 this[kHandle] = new _Hash(algorithm, xofLen);
#13 4.022 ^
#13 4.022
#13 4.022 Error: error:0308010C:digital envelope routines::unsupported
#13 4.022 at new Hash (node:internal/crypto/hash:71:19)
#13 4.022 at Object.createHash (node:crypto:130:10)
#13 4.022 at module.exports (/app/node_modules/webpack/lib/util/createHash.js:135:53)
#13 4.022 at NormalModule._initBuildHash (/app/node_modules/webpack/lib/NormalModule.js:417:16)
#13 4.022 at handleParseError (/app/node_modules/webpack/lib/NormalModule.js:471:10)
#13 4.022 at /app/node_modules/webpack/lib/NormalModule.js:503:5
#13 4.022 at /app/node_modules/webpack/lib/NormalModule.js:358:12
#13 4.022 at /app/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:373:3
#13 4.022 at iterateNormalLoaders (/app/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
#13 4.022 at Array.<anonymous> (/app/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
#13 4.022 at Storage.finished (/app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
#13 4.022 at /app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
#13 4.022 at /app/node_modules/graceful-fs/graceful-fs.js:123:16
#13 4.022 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
#13 4.022 opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
#13 4.022 library: 'digital envelope routines',
#13 4.022 reason: 'unsupported',
#13 4.022 code: 'ERR_OSSL_EVP_UNSUPPORTED'
#13 4.022 }
Could anyone help?
64 Replies
Project ID:
N/A
n/a
You might find these helpful:
- Trying to deploy a nuxtjs template project but docker build fails everytime
- Deploy error node-express app
- Build failing for simple react app
⚠️ experimental feature
can you please share your repo?
Okay. When using NODE_OPTIONS=--openssl-legacy-provider in env-variables, the build succeeds. However, my application (https://jpnuxt-production.up.railway.app/) now gives this error:
npm ERR! path /app
npm ERR! command failed
npm ERR! signal SIGTERM
npm ERR! command sh -c -- nuxt start
I was gonna recommend to upgrade your webpack version, using a legacy SSL provider would have been the last resort
?
Ah okay
Yess, here's my repo: https://github.com/stevenurk94/JP_NUXT
GitHub
GitHub - stevenurk94/JP_NUXT
Contribute to stevenurk94/JP_NUXT development by creating an account on GitHub.
prob running out of memory, try upgrading to dev plan please
hmm okay
but when I remove NODE_OPTIONS=--openssl-legacy-provider, I am getting the error as is obvious, but how can I upgrade my webpack version?
whats the current webpack version you are using
2.15.8
thats a very old version
current is 5.77
"@nuxt/webpack": "2.15.8"
yeah the old webpack version uses a deprecated hashing algorithm
when I check my webpack version using: npm ls webpack
I am getting this:
└─┬ [email protected]
└─┬ @nuxt/[email protected]
├─┬ @nuxt/[email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected] deduped
└─┬ [email protected]
└── [email protected] deduped
^
and how can I upgrade it?
same way you would any package
but going from 2x to 5x is gonna bring a whole bunch of other problems
npm
@nuxt/webpack
Latest version: 2.16.3, last published: 13 days ago. Start using @nuxt/webpack in your project by running
npm i @nuxt/webpack
. There are 9 other projects in the npm registry using @nuxt/webpack.I installed this app 2 years ago, so I am using webpack version: 4.46.0
and I am using: @nuxt/[email protected]
try adding
to your nuxt.config.js file
nope. doesnt work
okay then just keep the legacy variable
okay\
and about this question, my usage doesnt show me using a lot of memory or cpu usage?
its not a big deal, its just hashing the files, no security risk
screenshot?
ah okay. Well nice to know! I will try upgrading my webpack using another repo, just to see if it works
its possible there is a spike too thin to be displayed that hits the 512mb memory limit
hmm okay..
forgive me for asking but youre not Jennita right?
nope 😉
is that a client of yours?
yess
in that case you would want to be on the teams plan, so the least you could do would be to upgrade to the dev plan
im sure your client wouldn't appreciate the site only running for 500 hours a month anyway
yeah sure, I would upgrade, the project isnt live yet.. so if I am going to use railway I need to upgrade, however I wanted to test it before upgrading
but I'll try upgrading and retrying installing the ap
app *
im positive you could do plenty of testing without getting charged since you get 5$ in credits every month on the dev plan
Well I upgraded to development plan, but I am still getting the same error:
npm ERR! path /app
npm ERR! command failed
npm ERR! signal SIGTERM
npm ERR! command sh -c -- nuxt start
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-03-31T17_43_39_232Z-debug-0.log
npm WARN config production Use
--omit=dev
instead.
Jennita [email protected] start nuxt start
public your repo again please?
yess
its public
how can I read the logs?
wdym? youve sent me logs so you are reading them
Okay. But how can I access them?
in the UI like you have been
ah okay. Never mind, I thought that these logs maybe had some more information: /root/.npm/_logs/2023-03-31T17_43_39_232Z-debug-0.log..
but did you take a look at the repo?
not yet
so do you know what this error could be?
npm ERR! path /app
npm ERR! command failed
npm ERR! signal SIGTERM
npm ERR! command sh -c -- nuxt start
please be patient, im a little busy at the moment
ah okay. sorry ;).. just curious if you did know anything
you have done a full redeploy after upgrading to dev plan right?
yess!
Deleted the app and even deleted my git repo
@stevenurk94 what node version do you have installed on your computer?
16.18.1
can i see a screenshot of your service variables please
show me all the base url variables
Jennita Photography
Fotokaarten
Steun het goede doel | Keuze uit meer dan 50 prachtige fotokaarten | Vind jouw leuke fotokaart bij Jennita Photography | Blanco, Geboorte & Verjaardag
@stevenurk94
this is the new start script
and add these environment variables
replacing your already existing
NODE_OPTIONS
with the variable i just providedah check
okay I'll try it
thank you very much!
does that mean it works?
Yess! It workss
awesome
I do recommend you set aside some time to update to the latest version of nuxt2 or even maybe nuxt3
yess, sure.. this one is getting old
I am going to work on that!
Thanks for your help
no problem!