Open XYCaptain opened 10 months ago
React projects are normal
I'm seeing similar behavior on a symlinked package in a monorepo:
Error: Cannot find package '/Users/dave/code/mindr/mindr/node_modules/@meetmindr/constants/package.json' imported from /Users/dave/code/mindr/mindr/apps/web/build/index.js
at legacyMainResolve (node:internal/modules/esm/resolve:205:26)
at packageResolve (node:internal/modules/esm/resolve:831:14)
at moduleResolve (node:internal/modules/esm/resolve:901:20)
at defaultResolve (node:internal/modules/esm/resolve:1121:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36)
Failed running 'server.js'
I get this error with either the "vanilla" remix dev
or remix dev --manual -c \"node --watch-path server.js --watch server.js\"
where server.js
is from the express template
Same issue, couldn't figure out how to properly configure a project which relies on TypeScript ESM imports from above the project root. I use https://github.com/ecyrbe/zodios with NextJS and it works fine there.
I'd be great to have a guide or example on importing reusable components or tRPC / Zodios APIs from shared folders. I tried to migrate my NextJS project to Remix and stuck there.
Reproduction
package.json:
System Info
Used Package Manager
npm
Expected Behavior
dev normal
Actual Behavior
Error: Cannot find package '/Users/test_project/node_modules/my_wasm/' imported from /Users/test_project/node_modules/build/index.js