adverse-sapphire
adverse-sapphire2y ago

Cannot find module `/app` import from `/main.js`

I get the error when run the dockerfile, look like typescript not automatic transfer import app from './app' to import app from './app.js' Is anyone how to fix this?
No description
3 Replies
NeoNomade
NeoNomade2y ago
You are running an amd64 image on an arm machine
adverse-sapphire
adverse-sapphireOP2y ago
Look like this is not the issues, I think this is the typescript issue.
No description
compatible-crimson
compatible-crimson2y ago
When importing TypeScript files, add .js at the end of the importto solve the issue. For example: import app from './app.js'.

Did you find this page helpful?