-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Build error: Received '\x00__vite-browser-external?commonjs-proxy' #8469
Comments
I got a different error for both dev and build.
And this error is true because |
The branches had got mixed up -- I've fixed the main branch on the repro repo so it does not contain the experiment with |
It seems these issues are related. |
Hello @niczero. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
@niczero Would you provide a reproduction for the runtime error? I was not able to reproduce it. |
Not really practical -- an inertia app requires a backend as well as a frontend -- so best to ignore the runtime error and treat it as a side memo on the build error. |
@dominikg @bluwy May I ask you some questions about this issue? (sveltejs/vite-plugin-svelte#362, sveltejs/vite-plugin-svelte#363)
Am I right about these? |
No, vite-plugin-svelte logged an error, but didn't actually resolve As mentioned in sveltejs/vite-plugin-svelte#362 (comment) i suspect a combination of commonjs and A clean reproduction with vite's vanilla template would be great. |
Status update:
I made a local hacked version of So the runtime error remains and I will try to build a mini reproduction. |
Describe the bug
I am seeing a build error when working on a project of Inertia + Svelte using Vite. The code works fine in development mode with HMR, but shows this error when doing a production build.
Assets are produced in the
dist
dir, but the build is broken. The run-time error is actually in theobject-inspect
package.The run-time error may simply be a consequence of the build error (I don't know), but in case it's relevant, the run-time error is:
and points to the line https://github.com/inspect-js/object-inspect/blob/2cba8e119af13ff9648d5160871c3da22948ca8a/index.js#L69 where
require('./util.inspect')
is resulting in undefined.This run-time error is pretty much identical to #2598 but that was closed as resolved a year ago and I'm using all-up-to-date packages.
For the build error, I have tried substituting
redaxios
in place ofaxios
, but the error message remained the same.The repo has a strange name because I originally reported this under sveltejs/vite-plugin-svelte#362 but it looks like this is not a svelte problem but perhaps how vite handles cjs.
Reproduction
For the build error I have a minimal repro repo at https://github.com/niczero/vite-plugin-svelte-bug
System Info
System: OS: Linux 5.13 Ubuntu 20.04.4 LTS (Focal Fossa) CPU: (12) x64 Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz Memory: 25.71 GB / 30.96 GB Container: Yes Shell: 5.0.17 - /bin/bash Binaries: Node: 18.3.0 - /usr/bin/node npm: 8.11.0 - /usr/bin/npm Browsers: Chrome: 102.0.5005.61 Firefox: 100.0.2 npmPackages: vite: ^2.9.9 => 2.9.9
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: