#Resolve npm dependency error in production

17 messages · Page 1 of 1 (latest)

tiny marsh
#

I'm getting this error after deploying. I've added buildScript = "npm install --legacy-peer-deps" inside railway.toml file but it's not working.

ERR! code ERESOLVE
#11 1.981 npm ERR! ERESOLVE unable to resolve dependency tree
#11 1.981 npm ERR!
#11 1.982 npm ERR! While resolving: [email protected]
#11 1.982 npm ERR! Found: [email protected]
#11 1.982 npm ERR! node_modules/axios
#11 1.982 npm ERR!   axios@"^1.3.4" from the root project
#11 1.982 npm ERR!
#11 1.982 npm ERR! Could not resolve dependency:
#11 1.982 npm ERR! peer axios@"^0.27.2" from [email protected]
#11 1.982 npm ERR! node_modules/soap
#11 1.982 npm ERR!   soap@"^1.0.0" from the root project
#11 1.982 npm ERR!
#11 1.982 npm ERR! Fix the upstream dependency conflict, or retry
#11 1.982 npm ERR! this command with --force, or --legacy-peer-deps
#11 1.982 npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
#11 1.982 npm ERR!
#11 1.982 npm ERR! See /root/.npm/eresolve-report.txt for a full report.
#11 1.984
#11 1.984 npm ERR! A complete log of this run can be found in:
#11 1.984 npm ERR!     /root/.npm/_logs/2023-04-26T03_57_29_004Z-debug-0.log
#11 ERROR: process "/bin/bash -ol pipefail -c npm i" did not complete successfully: exit code: 1
-----
> [stage-0 7/8] RUN --mount=type=cache,id=s/c85c814f-f191-4ef1-8291-2368d5f11010-/root/npm,target=/root/.npm npm i:
#11 1.982 npm ERR!   soap@"^1.0.0" from the root project
#11 1.982 npm ERR!
#11 1.982 npm ERR! Fix the upstream dependency conflict, or retry
#11 1.982 npm ERR! this command with --force, or --legacy-peer-deps
#11 1.982 npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
#11 1.982 npm ERR!
#11 1.982 npm ERR! See /root/.npm/eresolve-report.txt for a full report.
#11 1.984
#11 1.984 npm ERR! A complete log of this run can be found in:
 
#11 1.984 npm ERR!     /root/.npm/_logs/2023-04-26T03_57_29_004Z-debug-0.log
-----
Dockerfile:21
-------------------
...
forest doveBOT
#

Project ID: c85c814f-f191-4ef1-8291-2368d5f11010

arctic pagoda
#

update your deps and use pnpm or yarn

#

why do you need version locked dependencies

mild vale
#

please send your full railway.toml file?

arctic pagoda
#

that too

mild vale
#

but yeah what alex said would be the proper solution

arctic pagoda
#

yeah using legacy peer deps or forcing dependencies to install is never a good idea

tiny marsh
tiny marsh
arctic pagoda
tiny marsh
#

I know it's not a good practice but somehow I need that

arctic pagoda
mild vale
#

its BuildCommand not buildScript

tiny marsh
#

updated, not working @mild vale