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

vite --version fails on nodejs 18 riscv64 #50503

Closed
kxxt opened this issue Nov 1, 2023 · 0 comments
Closed

vite --version fails on nodejs 18 riscv64 #50503

kxxt opened this issue Nov 1, 2023 · 0 comments
Labels
riscv64 Issues and PRs related to the riscv64 architecture. v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.

Comments

@kxxt
Copy link
Contributor

kxxt commented Nov 1, 2023

Version

v18.18.0

Platform

Linux kxxt2 6.1.42-1-sophgo-05620-gf3e0e4527b17 #1 SMP Wed, 16 Aug 2023 11:11:48 +0000 riscv64 GNU/Linux

Subsystem

v8

What steps will reproduce the bug?

Install vite 4.4.11 in an empty project.

Run node node_modules/.bin/vite --version

How often does it reproduce? Is there a required condition?

100% of the time. No condition is required.

What is the expected behavior? Why is that the expected behavior?

The version string gets printed:

vite/4.4.11 linux-riscv64 node-v18.18.0

What do you see instead?

file:///build/fluidd/src/fluidd/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:9
import esbuild, { transform as transform$1, formatMessages, build as build$3 } from 'esbuild';
^^^^^
SyntaxError: Named export 'build' not found. The requested module 'esbuild' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'esbuild';
const { transform: transform$1, formatMessages, build: build$3 } = pkg;

at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

Node.js v18.18.0

Additional information

nodejs 16 and 19, 20 are not affected.

It turns out that applying this commit to deps/v8 fixes the bug:
v8/v8@70caf33

@richardlau richardlau added the riscv64 Issues and PRs related to the riscv64 architecture. label Nov 1, 2023
kxxt added a commit to kxxt/archriscv-packages that referenced this issue Nov 1, 2023
Backport `[riscv64] Fix the StaticStackFrameSize` to fix vite.

- Upstream issue: nodejs/node#50503
- Upstream PR: nodejs/node#50506
@targos targos added the v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch. label Nov 1, 2023
felixonmars pushed a commit to felixonmars/archriscv-packages that referenced this issue Nov 2, 2023
Backport `[riscv64] Fix the StaticStackFrameSize` to fix vite.

- Upstream issue: nodejs/node#50503
- Upstream PR: nodejs/node#50506
@kxxt kxxt closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
riscv64 Issues and PRs related to the riscv64 architecture. v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.
Projects
None yet
Development

No branches or pull requests

3 participants