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

error 'The package "esbuild-windows-32" could not be found,....' #236

Closed
NathanKr opened this issue Feb 19, 2022 · 2 comments
Closed

error 'The package "esbuild-windows-32" could not be found,....' #236

NathanKr opened this issue Feb 19, 2022 · 2 comments

Comments

@NathanKr
Copy link

Describe the bug

I am getting an error 'The package "esbuild-windows-32" could not be found,....' when I try to see the component preview

Reproduction

Open vs code for https://github.com/NathanKr/react-draw-events
Navigate to https://github.com/NathanKr/react-draw-events/blob/main/src/components/Events.jsx
Put the cursor inside the component
Click the icon 'Open preview'
see the error : 'The package "esbuild-windows-32" could not be found,....'

Preview.js version

v1.1.0

System Info

System:
    OS: Windows 10 10.0.19042
    CPU: (4) x64 Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
    Memory: 2.42 GB / 7.89 GB
  Binaries:
    Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
  IDEs:
    VSCode: 1.64.2 - C:\Users\User\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
    Visual Studio: 16.11.31624.102 (Visual Studio Community 2019)
  Browsers:
    Chrome: 98.0.4758.102
    Edge: Spartan (44.19041.1266.0), Chromium (98.0.1108.56)
    Internet Explorer: 11.0.19041.1202

Used Package Manager

npm

Extension logs (useful for crashes)

No response

Preview logs (useful for rendering errors)

No response

Anything else?

Untitled

@fwouts
Copy link
Owner

fwouts commented Feb 20, 2022

Hi @NathanKr, thank you for the bug report.

It looks like somehow your VS Code thinks it's running on Windows in 32 bit mode. This error comes from esbuild, and you can see their logic here: https://github.com/evanw/esbuild/blob/bf341f7104b373d85061c31ebb00efc6f9a8bf5a/lib/npm/node-platform.ts. In particular, it looks like within your version of VS Code, ${process.platform} ${os.arch()} ${os.endianness()} returns ' 'win32 ia32 LE': 'esbuild-windows-32'.

I wonder if you might be using the wrong version of VS Code? You'd want to use the 64 bit user installer from https://code.visualstudio.com/download to replace your current version.

It's also entirely possible that my diagnostic is wrong, just let me know as it will help figure out the next steps to debug this :)

@fwouts
Copy link
Owner

fwouts commented Mar 17, 2022

I'm closing this as you haven't responded, feel free to reopen if you do :)

@fwouts fwouts closed this as completed Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants