deployment failed
suman-shrestha
TRIALOP

2 years ago

[2024-08-23T08:13:42.220Z] error /opt/node_modules/undici/lib/core/util.js:623

const listeners = (obj[kListeners] ??= [])

^^^

SyntaxError: Unexpected token '??='

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

4 Replies

2 years ago

Please share your Docerfile.


suman-shrestha
TRIALOP

2 years ago

FROM node:14
ENV NODE_ENV=production
WORKDIR /opt/
COPY ./package.json ./
ENV PATH /opt/node_modules/.bin:$PATH
RUN npm install
WORKDIR /opt/app
COPY . .
RUN npm run build
EXPOSE 1337
CMD ["npm", "start"]

suman-shrestha
TRIALOP

2 years ago

Hi,

I still could not resolve the error, any idea how to resolve it.


suman-shrestha
TRIALOP

2 years ago

I resolved the issue by changing the node version to FROM node:20 as one of the node_modules package (undici@6.19.8) required (node: '>=18.17')


Loading...