vitejs / vite

Next generation frontend tooling. It's fast!
http://vitejs.dev
MIT License
67.21k stars 6.04k forks source link

npm create vite throws error #7467

Closed kemalgencay closed 2 years ago

kemalgencay commented 2 years ago

Describe the bug

code 1 npm ERR! path /Users/kemalgencay/vite-project/node_modules/esbuild npm ERR! command failed npm ERR! command sh -c node install.js npm ERR! node:child_process:828 npm ERR! err = new Error(msg); npm ERR! ^ npm ERR! npm ERR! Error: Command failed: /Users/kemalgencay/vite-project/node_modules/esbuild/bin/esbuild --version npm ERR! dyld: Symbol not found: _SecTrustEvaluateWithError npm ERR! Referenced from: /Users/kemalgencay/vite-project/node_modules/esbuild/bin/esbuild npm ERR! Expected in: flat namespace

Reproduction

vite.new

System Info

System:
    OS: macOS Sierra 10.12.6
    CPU: (2) x64 Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz
    Memory: 90.39 MB / 4.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.14.1 - ~/.nvm/versions/node/v16.14.1/bin/node
    npm: 8.5.0 - ~/.nvm/versions/node/v16.14.1/bin/npm
  Browsers:
    Chrome: 99.0.4844.83
    Edge: 99.0.1150.52
    Safari: 12.1.2

Used Package Manager

npm

Logs

0 verbose cli [
0 verbose cli   '/Users/kemalgencay/.nvm/versions/node/v16.14.1/bin/node',
0 verbose cli   '/Users/kemalgencay/.nvm/versions/node/v16.14.1/bin/npm',
0 verbose cli   '-v'
0 verbose cli ]
1 info using npm@8.5.0
2 info using node@v16.14.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 3ms
5 timing config:load:file:/Users/kemalgencay/.nvm/versions/node/v16.14.1/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 3ms
8 timing config:load:env Completed in 2ms
9 timing config:load:file:/Users/kemalgencay/vite-project/.npmrc Completed in 0ms
10 timing config:load:project Completed in 23ms
11 timing config:load:file:/Users/kemalgencay/.npmrc Completed in 0ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/Users/kemalgencay/.nvm/versions/node/v16.14.1/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 2ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 38ms
19 timing npm:load:configload Completed in 38ms
20 timing npm:load:setTitle Completed in 32ms
21 timing config:load:flatten Completed in 6ms
22 timing npm:load:display Completed in 8ms
23 verbose logfile /Users/kemalgencay/.npm/_logs/2022-03-26T09_26_09_036Z-debug-0.log
24 timing npm:load:logFile Completed in 8ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 88ms
28 verbose exit 0
29 timing npm Completed in 314ms
30 info ok
Sezgi-MacBook-Pro:_logs kemalgencay$ cat 2022-03-26T09_26_09_036Z-debug-0.log

Validations

bluwy commented 2 years ago

The macos version you're using is unsupported. See https://github.com/evanw/esbuild/issues/1278#issuecomment-923603349 and workaround https://github.com/sveltejs/kit/issues/3028#issuecomment-991941064

kemalgencay commented 2 years ago

Hi, I installed Vite with npm install but when I do npm run dev in a project it gives error: command vite not found. My package.json is as you instructed:

"devDependencies": { "esbuild-wasm":"latest" }, "pnpm":{ "overrides":{ @.***" } }

My HW is old running OS 10.12 and can not upgrade to 10.13 What can I do? Thanks Regards On Sun, Mar 27, 2022 at 6:47 AM Bjorn Lu @.***> wrote:

The macos version you're using is unsupported. See evanw/esbuild#1278 (comment) https://github.com/evanw/esbuild/issues/1278#issuecomment-923603349 and workaround sveltejs/kit#3028 (comment) https://github.com/sveltejs/kit/issues/3028#issuecomment-991941064

— Reply to this email directly, view it on GitHub https://github.com/vitejs/vite/issues/7467#issuecomment-1079832319, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJEFR2EPFL6BKIJ6C3N3CSDVB7K6NANCNFSM5RWWPS6A . You are receiving this because you authored the thread.Message ID: @.***>

bluwy commented 2 years ago

The workaround shown is for pnpm. If you're using npm, use npm overrides. So it should be:

"devDependencies": {
  "esbuild-wasm":"latest"
},
"overrides": {
  "esbuild":"npm:esbuild-wasm@latest"
}
kemalgencay commented 2 years ago

Still it gives error:

Sezgi-MacBook-Pro:vite-yeni kemalgencay$ npm run dev

@.*** dev

vite

sh: vite: command not found

On Mon, Mar 28, 2022 at 5:33 AM Bjorn Lu @.***> wrote:

The workaround shown is for pnpm. If you're using npm, use npm overrides https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides. So it should be:

"devDependencies": { "esbuild-wasm":"latest" }, "overrides": { @.***" }

— Reply to this email directly, view it on GitHub https://github.com/vitejs/vite/issues/7467#issuecomment-1080118209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJEFR2ASODFF2YRN43WT2DDVCEK73ANCNFSM5RWWPS6A . You are receiving this because you authored the thread.Message ID: @.***>

kemalgencay commented 2 years ago

Sorry it worked after I installed vite again with npm install vite Thank you

On Mon, Mar 28, 2022 at 8:01 AM Kemal Gençay @.***> wrote:

Still it gives error:

Sezgi-MacBook-Pro:vite-yeni kemalgencay$ npm run dev

@.*** dev

vite

sh: vite: command not found

On Mon, Mar 28, 2022 at 5:33 AM Bjorn Lu @.***> wrote:

The workaround shown is for pnpm. If you're using npm, use npm overrides https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides. So it should be:

"devDependencies": { "esbuild-wasm":"latest" }, "overrides": { @.***" }

— Reply to this email directly, view it on GitHub https://github.com/vitejs/vite/issues/7467#issuecomment-1080118209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJEFR2ASODFF2YRN43WT2DDVCEK73ANCNFSM5RWWPS6A . You are receiving this because you authored the thread.Message ID: @.***>

kemalgencay commented 2 years ago

Hi , I type http://localhost:3000/--host but can not reach the site from my phone on the same network. How can I do please. Thanks Kemal

On Mon, Mar 28, 2022 at 8:04 AM Kemal Gençay @.***> wrote:

Sorry it worked after I installed vite again with npm install vite Thank you

On Mon, Mar 28, 2022 at 8:01 AM Kemal Gençay @.***> wrote:

Still it gives error:

Sezgi-MacBook-Pro:vite-yeni kemalgencay$ npm run dev

@.*** dev

vite

sh: vite: command not found

On Mon, Mar 28, 2022 at 5:33 AM Bjorn Lu @.***> wrote:

The workaround shown is for pnpm. If you're using npm, use npm overrides https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides. So it should be:

"devDependencies": { "esbuild-wasm":"latest" }, "overrides": { @.***" }

— Reply to this email directly, view it on GitHub https://github.com/vitejs/vite/issues/7467#issuecomment-1080118209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJEFR2ASODFF2YRN43WT2DDVCEK73ANCNFSM5RWWPS6A . You are receiving this because you authored the thread.Message ID: @.***>