-
-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing from vike/server throws error, missing /dist/esm/node/runtime/index.mjs #2040
Comments
If you remove the file |
No, as expected it is then treated as an 'external dependency' sind the import is simply missing. If however I edit server.js to export from |
It's defined over |
I went ahead with the aforementioned patch (pre-released as |
As before it works if I import from
|
I'll need a minimal reproduction here. (So that I can take the decision whether it's an issue with your build setup or whether Vike should revive those resolve fallbacks.) |
Here you go: https://github.com/flipswitchingmonkey/issue_vike_import It's being imported in |
It does seem to be an issue about your build setup (I guess Directus's side). But I'll revive the resolve fallbacks nevertheless. |
Pre-released as |
Description
I'm importing vike's renderPage and bundle it through rollup. This works fine if I import like so:
However this is deprecated and outputs the notification that imports should be done from
This, however, ends up with this error:
I wonder whether rollup may be part of the problem here, but looking at the actually imported package from
node_modules/vike/server.js
, it tries to import./dist/esm/node/runtime/index.mjs
which does not existThe text was updated successfully, but these errors were encountered: