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

unable to vitedge build #31

Closed
hrgui opened this issue Jun 7, 2021 · 4 comments
Closed

unable to vitedge build #31

hrgui opened this issue Jun 7, 2021 · 4 comments

Comments

@hrgui
Copy link
Contributor

hrgui commented Jun 7, 2021

Repo: https://github.com/hrgui/pokedex-vitedge

warning package.json: No license field
$ rm -rf dist && vitedge build
(node:10381) UnhandledPromiseRejectionWarning: Error: Transform failed with 1 error:
/Users/hrgui/projects/pokedex-viteedge/node_modules/esbuild/lib/main.js:239:12: error: Invalid option in transform() call: "jsx"
    at failureErrorWithLog (/Users/hrgui/projects/pokedex-viteedge/node_modules/esbuild/lib/main.js:1443:15)
    at /Users/hrgui/projects/pokedex-viteedge/node_modules/esbuild/lib/main.js:1288:20
    at /Users/hrgui/projects/pokedex-viteedge/node_modules/esbuild/lib/main.js:606:9
    at handleIncomingPacket (/Users/hrgui/projects/pokedex-viteedge/node_modules/esbuild/lib/main.js:703:9)
    at Socket.readFromStdout (/Users/hrgui/projects/pokedex-viteedge/node_modules/esbuild/lib/main.js:573:7)
    at Socket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:284:9)
    at Socket.Readable.push (_stream_readable.js:223:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:10381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:10381) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✨  Done in 0.71s.

I am also getting this issue on this repo: https://github.com/subhendukundu/vitedge-react-template

yarn run v1.22.10
warning package.json: No license field
$ rm -rf dist && vitedge build
building for production...
✓ 62 modules transformed.
dist/client/assets/logo.ecc203fb.svg    2.61kb
dist/client/index.html                  0.46kb
dist/client/manifest.json               0.78kb
dist/client/ssr-manifest.json           7.19kb
dist/client/assets/About.3a223546.js    0.19kb / brotli: 0.12kb
dist/client/assets/index.10d42577.js    2.69kb / brotli: 1.13kb
dist/client/assets/Home.b57b4c20.js     0.41kb / brotli: 0.21kb
dist/client/assets/index.e9904e82.css   0.46kb / brotli: 0.21kb
dist/client/assets/vendor.9557a7b8.js   166.09kb / brotli: 47.07kb
building SSR bundle for production...
✓ 18 modules transformed.
dist/ssr/main.js   24.62kb
(node:10830) UnhandledPromiseRejectionWarning: Error: Transform failed with 1 error:
/Users/hrgui/projects/vitedge-react-template/node_modules/esbuild/lib/main.js:239:12: error: Invalid option in transform() call: "jsx"
    at failureErrorWithLog (/Users/hrgui/projects/vitedge-react-template/node_modules/esbuild/lib/main.js:1443:15)
    at /Users/hrgui/projects/vitedge-react-template/node_modules/esbuild/lib/main.js:1288:20
    at /Users/hrgui/projects/vitedge-react-template/node_modules/esbuild/lib/main.js:606:9
    at handleIncomingPacket (/Users/hrgui/projects/vitedge-react-template/node_modules/esbuild/lib/main.js:703:9)
    at Socket.readFromStdout (/Users/hrgui/projects/vitedge-react-template/node_modules/esbuild/lib/main.js:573:7)
    at Socket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:284:9)
    at Socket.Readable.push (_stream_readable.js:223:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:10830) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:10830) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✨  Done in 5.37s.
@frandiox
Copy link
Owner

frandiox commented Jun 8, 2021

@hrgui Thanks for reporting! Looks like it's an ESBuild version incompatibility. It was updated to 0.12 in latest Vite but Vitedge still uses 0.11.

Try adding this to your package.json (remove yarn.lock and node_modules before installing everything again):

  "resolutions": {
    "esbuild": "0.12.6"
  },

I'll release a fix soon.

@hrgui
Copy link
Contributor Author

hrgui commented Jun 8, 2021

Thanks, the resolutions did help.

@frandiox
Copy link
Owner

frandiox commented Jun 8, 2021

Should be fixed in 0.13.1

@frandiox frandiox closed this as completed Jun 8, 2021
@hrgui
Copy link
Contributor Author

hrgui commented Jun 8, 2021

Thanks, confirmed it was working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants