6 months ago
Hi
can't build any version of my project, also older (worked earlier) version are failing
Seems to bew some railway node change?
Starting Container
npm warn config production Use --omit=dev instead.
> epbf-overlay-backend@1.0.0 start
> node backend.js
/app/node_modules/cheerio/node_modules/undici/lib/web/webidl/index.js:512
webidl.is.File = webidl.util.MakeTypeAssertion(File)
^
ReferenceError: File is not defined
at Object.<anonymous> (/app/node_modules/cheerio/node_modules/undici/lib/web/webidl/index.js:512:48)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/app/node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js:12:20)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
Node.js v18.20.5
npm warn config production Use --omit=dev instead.
> epbf-overlay-backend@1.0.0 start
> node backend.js
5 Replies
6 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
6 months ago
the most likely issue is your dependancy chain.
unidici for web requests is normal. however, cheerio is a server-side library for parsing & manipulating html, similar to jQuery - not usually for file handling.
try newer versions of your dependancies? let me know if that doesn't fix it
6 months ago
Still not working. Added newer dependencies:
"engines": {
"node": ">=18.20.0"
},
"dependencies": {
"axios": "^1.7.2",
"cheerio": "^1.1.0",
"cors": "^2.8.5",
"express": "^4.19.0"kwiecienmarcin
node 20.0 fixes issue.
6 months ago
Great to hear. As I've said, it should be your dependancies.
