question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm create vite throws error

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kemalgencaycommented, Mar 28, 2022

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: @.***>

0reactions
kemalgencaycommented, Mar 28, 2022

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: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running npm create vite@latest project gives module error on ...
I can run this same command on Ubuntu or Windows and I get no issues. import fs from 'node:fs' ^^^^^^ SyntaxError: Cannot use...
Read more >
Troubleshooting - Vite
Vite cannot handle and does not support code that only runs on non-strict mode (sloppy mode). This is because Vite uses ESM and...
Read more >
create-vite - npm
Start using create-vite in your project by running `npm i create-vite`. There are 6 other projects in the npm registry using create-vite.
Read more >
Get Started with ActiveReportsJS Report Viewer in Vite.js(React)
If the command fails with the error that says that 'vite' is not recognized as an internal or external command, operable program or...
Read more >
Vite JS – The Installation Guide - Radixweb
Now, you have a question: Can I set up a single-page application? The short answer is Yes! Let's try with Vue. After executing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found