Mars-2030
(Mars 2030)
August 8, 2021, 2:27pm
1
how can I change the nove version from 16 to 14 or 12 on my project?
Not possible at the moment (using provided buildpacks). If you want, you can provide a Dockerfile and use Dockerfile application mode, there you can use any node version you want.
cognvn
(Cogn)
August 10, 2021, 3:04pm
3
This post can be a solution to your problem:
I ran a test project with your package.json and it works just fine. I guess there’s something wrong with your code. Make sure your Express App listens on port 3000. And if your app uses environment variables, set them in Qovery console.
One thing you might try adding in package.json is the “engines” property where you can specify the version of node and npm.
"engines": {
"node": "14.x",
"npm": "7.x"
}
Muukund
(Muukund Chikkeralli)
August 10, 2021, 3:51pm
4
I have specified Node 10 in Dockerfile and it works flawlessly.
In Dockerfile, just add this line and change 10 to any version you want.
FROM node:10
Mars-2030
(Mars 2030)
August 10, 2021, 4:08pm
5
thanks a lot for your help
Mars-2030
(Mars 2030)
August 10, 2021, 4:12pm
6
I could not set the port see the issue here
cognvn
(Cogn)
August 11, 2021, 12:52am
7
No, i mean specifying node and npm version in package.json
, in case using buildpack
"engines": {
"node": "12.x",
"npm": "6.x"
}
If you want to use yarn
to install packages, include your yarn.lock
(instead of package-lock.json
) when pushing your code to github