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

Windows Installation Issue with other packages #3995

Open
AngeloAnolin opened this issue Nov 29, 2024 · 2 comments
Open

Windows Installation Issue with other packages #3995

AngeloAnolin opened this issue Nov 29, 2024 · 2 comments

Comments

@AngeloAnolin
Copy link

AngeloAnolin commented Nov 29, 2024

This has really stumped me. Pardon if this should be reported in another Github repository, but since I am having specific issue only with this package, I thought as well of reporting here.

In a nutshell, the package @esbuild/win32-x64 fails when it is being installed alongside other packages for an application. In a clean, only @esbuild install, it downloads fine.

This is the scenario I have tested it upon.

Machine OS & Details

  • Windows 11
  • Node 20.11.1
  • npm 10.2.4

React Application

  • Scaffold a new application using Vite with command: npm create vite@latest vite-react-ts -- --template react-ts
  • Navigate inside the vite-react-ts folder
  • Run npm install and I get the following in the console:
    image
  • The file package.json contents are below
{
  "name": "vite-react-ts",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc -b && vite build",
    "lint": "eslint .",
    "preview": "vite preview"
  },
  "dependencies": {
    "react": "^18.3.1",
    "react-dom": "^18.3.1"
  },
  "devDependencies": {
    "@eslint/js": "^9.15.0",
    "@types/react": "^18.3.12",
    "@types/react-dom": "^18.3.1",
    "@vitejs/plugin-react": "^4.3.4",
    "eslint": "^9.15.0",
    "eslint-plugin-react-hooks": "^5.0.0",
    "eslint-plugin-react-refresh": "^0.4.14",
    "globals": "^15.12.0",
    "typescript": "~5.6.2",
    "typescript-eslint": "^8.15.0",
    "vite": "^6.0.1"
  }
}
  • With the install failing, the folder node_modules is not created

Empty Application

  • Create a folder called empty and navigate inside it
  • Run npm init
  • Accept all default options as presented
    image
  • Install the esbuild package alone via npm i @esbuild/win32-x64
    image
  • Navigate inside the folder node_modules\@esbuild\win32-x64 and list the contents.
    image

Legacy Application (Initialized with Create React App)

  • Trying as well to install @esbuild to an existing application via npm i @esbuild/win32-x64, I get the the folder @esbuild\win32-x64 being created inside node_modules, but the file esbuild.exe is not present
    image

Other Notes

  • I think we can rule out any antivirus blocking the install, as I've been able to install the package in an empty project folder.
  • I also tried to download the binary through the URL https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz, extracting the esbuild.exe file and attempting to copy it to the folder inside the node_modules folder but get the Access Denied

Has anyone experienced this issue before?

@hyrious
Copy link

hyrious commented Nov 29, 2024

I guess it has some thing to do with your terminal being executed under administrator permission. You can try to use a normal (user) permission terminal to see if it still happens.

@AngeloAnolin
Copy link
Author

I guess it has some thing to do with your terminal being executed under administrator permission. You can try to use a normal (user) permission terminal to see if it still happens.

I did tried using terminal under non-admin permission and still get the same result.

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