NPM packages not installing

Hello everyone! This is my first time deploying w/ railway.app and I can't get my NPM packages running. Here is my structure:
12 Replies
Percy
Percy2y ago
Project ID: N/A
Percy
Percy2y ago
It sounds like you may not have a start script in your package.json. You can add one by adding a script named "start" into the scripts field in package.json. Once you have done this, you can run railway up to redeploy it with your new changes.
⚠️ experimental feature
milo
milo2y ago
send the project id please
lennard.
lennard.OP2y ago
lennard.
lennard.OP2y ago
f46cf3c2-bd0d-43a6-a18d-42ff433bb1d1
milo
milo2y ago
okay can you send the logs for your project and can you send ur package.json
lennard.
lennard.OP2y ago
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module 'express'
Require stack:
- /app/server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/server.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/app/server.js' ]
}
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module 'express'
Require stack:
- /app/server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/server.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/app/server.js' ]
}
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module 'express'
Require stack:
- /app/server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/server.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/app/server.js' ]
}
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module 'express'
Require stack:
- /app/server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/server.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/app/server.js' ]
}
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module 'express'
Require stack:
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module 'express'
Require stack:
- /app/server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/server.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/app/server.js' ]
}
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module 'express'
Require stack:
- /app/server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/server.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/app/server.js' ]
}
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module 'express'
Require stack:
- /app/server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/server.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/app/server.js' ]
}
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module 'express'
Require stack:
- /app/server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/server.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/app/server.js' ]
}
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module 'express'
Require stack:
{
"name": "figma-copywriting-ai_backend",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"hex-rgb": "^5.0.0",
"openai": "^3.1.0"
},
"devDependencies": {
"@types/node": "^18.11.12"
}
}
{
"name": "figma-copywriting-ai_backend",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"hex-rgb": "^5.0.0",
"openai": "^3.1.0"
},
"devDependencies": {
"@types/node": "^18.11.12"
}
}
milo
milo2y ago
can u send all the logs please dude
lennard.
lennard.OP2y ago
And my package.json :)
milo
milo2y ago
express isnt in ur package.json dependencies lmao you need to add it into your package.json
lennard.
lennard.OP2y ago
wait what the fuck- why is it not in there
milo
milo2y ago
lo l
Want results from more Discord servers?
Add your server