Home > database >  npm install throwing expected "0.15.7" but got "" on new vite project
npm install throwing expected "0.15.7" but got "" on new vite project

Time:09-11

I just created a new vite project and i am getting the following error when executing npm install.

node.js: 16.17.0

npm: 8.15.0

npm ERR! C:\xxx\GIT\NewTestProject\node_modules\esbuild\install.js:93
npm ERR!     throw new Error(`Expected ${JSON.stringify("0.15.7")} but got ${JSON.stringify(stdout)}`);
npm ERR! C:\xxx\GIT\NewTestProject\node_modules\esbuild\install.js:93
npm ERR!
npm ERR! Error: Expected "0.15.7" but got ""
npm ERR!     at validateBinaryVersion (C:\xxx\GIT\NewTestProject\node_modules\esbuild\install.js:93:11)
npm ERR!     at C:\xxx\GIT\NewTestProject\node_modules\esbuild\install.js:240:5

package.json

{
  "name": "newtestproject",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "vue": "^3.2.37"
  },
  "devDependencies": {
    "@vitejs/plugin-vue": "^3.1.0",
    "vite": "^3.1.0"
  }
}

CodePudding user response:

Running cmd as admin solved the issue.

  • Related