-
Notifications
You must be signed in to change notification settings - Fork 8
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
Error when using with Vite #13
Comments
It’s an ESBuild plugin. In what way are you using it with Vite? |
Got the same error... I switched to this as suggested here: https://github.com/remorses/esbuild-plugins#plugins |
Can I get a reproduction? |
Here: https://github.com/mqttjs/MQTT.js/blob/main/examples/vite-example/vite.config.js Just replace |
Vite uses ESBuild (and Rollup) so you are able to use ESBuild plugins like this one. https://vitejs.dev/config/shared-options.html#esbuild |
Got it. This is not a usage I have considered before. I'll have a look. |
@robertsLando how did you resolve this issue, i have been dealing with a very annoying issue that is similar to the one you had |
I used the other package |
- Getting an error, same as cyco130/esbuild-plugin-polyfill-node#13: ``` Error: Failed to scan for dependencies from entries: /home/bender/dev/deephaven/tmp/react-hook-explore/vite-project/index.html ✘ [ERROR] The injected path "/home/bender/dev/deephaven/tmp/react-hook-explore/vite-project/node_modules/esbuild-plugin-polyfill-node/polyfills/buffer.js" cannot be marked as external ✘ [ERROR] The injected path "/home/bender/dev/deephaven/tmp/react-hook-explore/vite-project/node_modules/esbuild-plugin-polyfill-node/polyfills/process.js" cannot be marked as external ✘ [ERROR] The injected path "/home/bender/dev/deephaven/tmp/react-hook-explore/vite-project/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js" cannot be marked as external ```
- Error is `[ERROR] The injected path "/home/bender/dev/deephaven/iris-oss/web-client-ui/main/node_modules/esbuild-plugin-polyfill-node/polyfills/buffer.js" cannot be marked as external` - Same as another issue described here: cyco130/esbuild-plugin-polyfill-node#13 - Will try the other package once again: https://github.com/remorses/esbuild-plugins
For anyone in the same situation as I was. There seems to be an issue with the way Vite loads esbuild plugins and isn't related to this package. An alternative is to use Loading it into my // Polyfill for @azure/service-bus as vite-plugin-node-polyfills doesn't include it
import nextTick from 'next-tick';
process.nextTick = nextTick; |
When using with Vite I am getting the following error:
The injected path "/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js" cannot be marked as external
. Is there some extra config I need to do here?The text was updated successfully, but these errors were encountered: