Skip to content
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

An app that broken after 2.0.0-beta.51 #1780

Closed
3 tasks done
sibbng opened this issue Jan 28, 2021 · 1 comment
Closed
3 tasks done

An app that broken after 2.0.0-beta.51 #1780

sibbng opened this issue Jan 28, 2021 · 1 comment

Comments

@sibbng
Copy link
Contributor

sibbng commented Jan 28, 2021

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug

Unfortunately I can't describe the error while vite is not giving me any error message. But I tried to be specific as much as I can in reproduction section.

Reproduction

This is the demo app used for https://github.com/antfu/reactivue.

Reproduction: https://github.com/sibbng/vite-issue-repro

version yarn dev yarn build && yarn serve
2.0.0-beta.50 works works
2.0.0-beta.51 doesn't work. no errors from vite itself. just reactivue errors. works
2.0.0-beta.52 doesn't work. no errors from vite itself. just reactivue errors. works
2.0.0-beta.53 Invalid loader: "mjs" works

Note:

  • On beta.50 my entry script in index.html was like that: src="src/index.tsx". beta.51 didn't allow that entry and throw an error. I fixed it by putting slash at the beginning src="/src/index.tsx" .
  • beta.53 error:
    image

System Info

  • vite version: 2.0.0-beta.51
  • Operating System: Windows 10
  • Node version: v14.15.4
  • Package manager (npm/yarn/pnpm) and version: yarn

Logs (Optional if provided reproduction)

  1. Run vite or vite build with the --debug flag.
  2. Provide the error log here.
@vtenfys
Copy link

vtenfys commented Jan 28, 2021

I'm also seeing this error in 2.0.0-beta.53 and 2.0.0-beta.54:

22:59:28 [vite] new dependencies found: @prefresh/vite/runtime, @prefresh/vite/utils, updating...
 > error: [JavaScript plugins] Invalid loader: "mjs" (valid: js, jsx, ts, tsx, css, json, text, base64, dataurl, file, binary)

 > error: [JavaScript plugins] Invalid loader: "mjs" (valid: js, jsx, ts, tsx, css, json, text, base64, dataurl, file, binary)

22:59:28 [vite] error while updating dependencies:
Error: Build failed with 2 errors:
error: [JavaScript plugins] Invalid loader: "mjs" (valid: js, jsx, ts, tsx, css, json, text, base64, dataurl, file, binary)
error: [JavaScript plugins] Invalid loader: "mjs" (valid: js, jsx, ts, tsx, css, json, text, base64, dataurl, file, binary)
    at failureErrorWithLog (/Users/david/Code/my-project/node_modules/esbuild/lib/main.js:969:15)
    at buildResponseToResult (/Users/david/Code/my-project/node_modules/esbuild/lib/main.js:767:32)
    at /Users/david/Code/my-project/node_modules/esbuild/lib/main.js:819:20
    at handleIncomingPacket (/Users/david/Code/my-project/node_modules/esbuild/lib/main.js:566:9)
    at Socket.readFromStdout (/Users/david/Code/my-project/node_modules/esbuild/lib/main.js:482:7)
    at Socket.emit (node:events:379:20)
    at addChunk (node:internal/streams/readable:313:12)
    at readableAddChunk (node:internal/streams/readable:288:9)
    at Socket.Readable.push (node:internal/streams/readable:227:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants