You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You aren't supposed to move node_modules/ into your production environement (e.g. $ rsync node_modules/ user@remote:/node_modules), instead you're supposed to run $ pnpm install and then $ pnpm run build in your production environment. The path in importBuild.cjs will then be correct.
I undertand this is very limiting (which I find unacceptable) and I'll be working on #562 and #1165 (which will solve the issue) right after the V1 design is out-of-beta.
Description
There is this bug inside
importBuild.cjs
which is generated automatically here:const { setImportBuildGetters } = await import('${importPath}');
,In NPM workspace,
node_modules/vike
is located under root directory of the whole monorepo, which causes something of this sort:Instead of resolving the location during build time, this could be modified as follows:
Or even better,
loadImportBuild.js
could be added to exports in package.json so that it can simply be imported like so:For now, I am manually updating
importBuild.cjs
, as otherwise the import is just invalid whendist
is deployed without the rest of the monorepo.The text was updated successfully, but these errors were encountered: