R
Railway11mo ago
Mustafa

nextjs absolute imports not working !!

Hello, I've an absolute paths in my tsconfig
"baseUrl": ".",
"paths": {
"src/*": ["./*"],
}
"baseUrl": ".",
"paths": {
"src/*": ["./*"],
}
when I am trying to import that inside my code all imports are undefined e.g
import fn from "src/fn"
fn.check(); // this will fail and throws error that fn is undefined
import fn from "src/fn"
fn.check(); // this will fail and throws error that fn is undefined
how ever if i am trying to import as
import fn from "../fn"
import fn from "../fn"
this will work ! i think this issue is related to railway server itself since code works as expected in differnet servers and platforms except railway any help about that will be appreciated thanks in advance
3 Replies
Percy
Percy11mo ago
Please provide your project ID or reply with N/A. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.
Brody
Brody11mo ago
im sorry but this isnt an issue with railway, railway runs your code as is
Percy
Percy11mo ago
No project ID was provided. Closing thread.
Want results from more Discord servers?
Add your server