-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
nuxi dev fails with Error: Cannot find module fsevents #11863
Comments
Two comments, unrelated to the issue. First, for the moment you should add {
"devDependencies": {
"@nuxt/bridge": "npm:@nuxt/bridge-edge@0.0.0-27217109.e13baf9"
}
} Second, you should just be able to run |
With regard to this issue, the issue is that bundling const require$$3 = require('fsevents');
// ...
let fsevents;
try {
fsevents = require$$3__default;
} catch (error) {
if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
} ( We can 'solve' by adding 'chokidar' to dependency list but this is likely not a good solution - we may need some rollup magic - or bug fixing. cc: @pi0. |
@danielroe fyi, I deliberately added nuxt/bridge as a production dependency. When you are building for a Lambda, Netlify Function, or Edge handler then you don't have any use for production dependencies in the traditional sense. So instead it's recommended to:
Eg this way if you are building on Netlify you can run |
Hi, @pimlie thanks for reporting the issue. Actually, you are facing this issue because of using the new cli, not the bridge module (nor nitro). You can keep using Also normally with nuxt 3 / bridge, you should put all dependencies to Refarding the issue: Nuxi cli embeds all dependencies so that global installation is as fast as possible but as @danielroe mentioned, rollup used to bundle |
@pi0 If users are meant not to be using |
Issue is solved i tried on ubuntu since in nuxi >= BTW actually |
Environment
Describe the bug and expected behavior
Running
yarn nuxi dev
immediately fails with this errorSteps to reproduce
On a Linux system:
yarn add @nuxt/bridge-edge
yarn nuxi dev src
Additional context
The text was updated successfully, but these errors were encountered: