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

Cannot npm run dev nor npm install because of different versions of esbuild #2865

Closed
5ucur opened this issue Jan 24, 2023 · 5 comments
Closed

Comments

@5ucur
Copy link

5ucur commented Jan 24, 2023

I don't know much about this software, I was trying to npm run dev in a project but there were issues so I thought a reinstall would help, but it kept happening so I deleted node_modules to reinstall from a blank slate. Every time it gave me such an error:

npm ERR! /home/username/path/to/project/node_modules/esbuild/install.js:94
npm ERR!     throw new Error(`Expected ${JSON.stringify("0.16.12")} but got ${JSON.stringify(stdout)}`);
npm ERR!           ^
npm ERR! 
npm ERR! Error: Expected "0.16.12" but got "0.17.3"
npm ERR!     at validateBinaryVersion (/home/username/path/to/project/node_modules/esbuild/install.js:94:11)
npm ERR!     at /home/username/path/to/project/node_modules/esbuild/install.js:241:5
npm ERR! 
npm ERR! Node.js v19.4.0

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/username/.npm/_logs/2023-01-23T23_05_19_669Z-debug-0.log

I am unable to take a look at this problematic install.js file as the node_modules folder disappears.

The whole log is below. but unfortunately the Details section on GitHub does not seem to support code block formatting. It tried to group all the lines into one paragraph so I had to separate them one by one, and put each into code lines as :link: would become 🔗 for example. See lower comment by evanw for how to avoid this behaviour with Markdown.

Irregardless, the whole log as well as the error above are completely the same as they were output, except for changing the username and path to the project.

Whole log here
0 verbose cli /usr/bin/node /usr/bin/npm
1 info using npm@8.19.2
2 info using node@v19.4.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 3ms
5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 4ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/home/username/path/to/project/.npmrc Completed in 1ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:/home/username/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/usr/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 2ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 18ms
19 timing npm:load:configload Completed in 18ms
20 timing npm:load:mkdirpcache Completed in 2ms
21 timing npm:load:mkdirplogs Completed in 1ms
22 verbose title npm install
23 verbose argv "install"
24 timing npm:load:setTitle Completed in 2ms
25 timing config:load:flatten Completed in 5ms
26 timing npm:load:display Completed in 8ms
27 verbose logfile logs-max:10 dir:/home/username/.npm/_logs
28 verbose logfile /home/username/.npm/_logs/2023-01-23T23_05_19_669Z-debug-0.log
29 timing npm:load:logFile Completed in 9ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 41ms
33 timing arborist:ctor Completed in 2ms
34 silly logfile start cleaning logs, removing 1 files
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 160ms
37 timing idealTree:userRequests Completed in 0ms
38 silly idealTree buildDeps
39 silly fetch manifest flowbite@^1.6.3
40 http fetch GET 200 https://registry.npmjs.org/flowbite 33ms (cache hit)
41 silly fetch manifest postcss@^8.4.21
42 http fetch GET 200 https://registry.npmjs.org/postcss 8ms (cache hit)
43 silly fetch manifest vite@^4.0.4
44 http fetch GET 200 https://registry.npmjs.org/vite 15ms (cache hit)
45 silly fetch manifest @types/node@>= 14
46 http fetch GET 200 https://registry.npmjs.org/@types%2fnode 18ms (cache hit)
47 silly fetch manifest less@*
48 http fetch GET 200 https://registry.npmjs.org/less 7ms (cache hit)
49 silly fetch manifest sass@*
50 http fetch GET 200 https://registry.npmjs.org/sass 8ms (cache hit)
51 silly fetch manifest stylus@*
52 http fetch GET 200 https://registry.npmjs.org/stylus 17ms (cache hit)
53 silly fetch manifest sugarss@*
54 http fetch GET 200 https://registry.npmjs.org/sugarss 5ms (cache hit)
55 silly fetch manifest terser@^5.4.0
56 http fetch GET 200 https://registry.npmjs.org/terser 7ms (cache hit)
57 silly placeDep ROOT flowbite@1.6.3 REPLACE for: projectname@0.0.0 want: ^1.6.3
58 silly placeDep ROOT postcss@8.4.21 REPLACE for: projectname@0.0.0 want: ^8.4.21
59 silly placeDep ROOT vite@4.0.4 REPLACE for: projectname@0.0.0 want: ^4.0.4
60 timing idealTree:#root Completed in 237ms
61 timing idealTree:node_modules/flowbite Completed in 0ms
62 timing idealTree:node_modules/postcss Completed in 0ms
63 timing idealTree:node_modules/vite Completed in 1ms
64 timing idealTree:buildDeps Completed in 240ms
65 timing idealTree:fixDepFlags Completed in 1ms
66 timing idealTree Completed in 410ms
67 timing reify:loadTrees Completed in 411ms
68 timing reify:diffTrees Completed in 5ms
69 silly reify moves {}
70 timing reify:retireShallow Completed in 3ms
71 timing reify:createSparse Completed in 40ms
72 timing reify:loadBundles Completed in 0ms
73 silly audit bulk request {
73 silly audit   '@esbuild/android-arm': [ '0.16.12' ],
73 silly audit   '@esbuild/android-arm64': [ '0.16.12' ],
73 silly audit   '@esbuild/android-x64': [ '0.16.12' ],
73 silly audit   '@esbuild/darwin-arm64': [ '0.16.12' ],
73 silly audit   '@esbuild/darwin-x64': [ '0.16.12' ],
73 silly audit   '@esbuild/freebsd-arm64': [ '0.16.12' ],
73 silly audit   '@esbuild/freebsd-x64': [ '0.16.12' ],
73 silly audit   '@esbuild/linux-arm': [ '0.16.12' ],
73 silly audit   '@esbuild/linux-arm64': [ '0.16.12' ],
73 silly audit   '@esbuild/linux-ia32': [ '0.16.12' ],
73 silly audit   '@esbuild/linux-loong64': [ '0.16.12' ],
73 silly audit   '@esbuild/linux-mips64el': [ '0.16.12' ],
73 silly audit   '@esbuild/linux-ppc64': [ '0.16.12' ],
73 silly audit   '@esbuild/linux-riscv64': [ '0.16.12' ],
73 silly audit   '@esbuild/linux-s390x': [ '0.16.12' ],
73 silly audit   '@esbuild/linux-x64': [ '0.16.12' ],
73 silly audit   '@esbuild/netbsd-x64': [ '0.16.12' ],
73 silly audit   '@esbuild/openbsd-x64': [ '0.16.12' ],
73 silly audit   '@esbuild/sunos-x64': [ '0.16.12' ],
73 silly audit   '@esbuild/win32-arm64': [ '0.16.12' ],
73 silly audit   '@esbuild/win32-ia32': [ '0.16.12' ],
73 silly audit   '@esbuild/win32-x64': [ '0.16.12' ],
73 silly audit   '@nodelib/fs.scandir': [ '2.1.5' ],
73 silly audit   '@nodelib/fs.stat': [ '2.0.5' ],
73 silly audit   '@nodelib/fs.walk': [ '1.2.8' ],
73 silly audit   '@popperjs/core': [ '2.11.6' ],
73 silly audit   acorn: [ '7.4.1' ],
73 silly audit   'acorn-node': [ '1.8.2' ],
73 silly audit   'acorn-walk': [ '7.2.0' ],
73 silly audit   anymatch: [ '3.1.3' ],
73 silly audit   arg: [ '5.0.2' ],
73 silly audit   autoprefixer: [ '10.4.13' ],
73 silly audit   'binary-extensions': [ '2.2.0' ],
73 silly audit   braces: [ '3.0.2' ],
73 silly audit   browserslist: [ '4.21.4' ],
73 silly audit   'camelcase-css': [ '2.0.1' ],
73 silly audit   'caniuse-lite': [ '1.0.30001441' ],
73 silly audit   chokidar: [ '3.5.3' ],
73 silly audit   'glob-parent': [ '5.1.2', '6.0.2' ],
73 silly audit   'color-name': [ '1.1.4' ],
73 silly audit   cssesc: [ '3.0.0' ],
73 silly audit   defined: [ '1.0.1' ],
73 silly audit   detective: [ '5.2.1' ],
73 silly audit   didyoumean: [ '1.2.2' ],
73 silly audit   dlv: [ '1.1.3' ],
73 silly audit   'electron-to-chromium': [ '1.4.284' ],
73 silly audit   esbuild: [ '0.16.12' ],
73 silly audit   escalade: [ '3.1.1' ],
73 silly audit   'fast-glob': [ '3.2.12' ],
73 silly audit   fastq: [ '1.15.0' ],
73 silly audit   'fill-range': [ '7.0.1' ],
73 silly audit   'fraction.js': [ '4.2.0' ],
73 silly audit   fsevents: [ '2.3.2' ],
73 silly audit   'function-bind': [ '1.1.1' ],
73 silly audit   has: [ '1.0.3' ],
73 silly audit   'is-binary-path': [ '2.1.0' ],
73 silly audit   'is-core-module': [ '2.11.0' ],
73 silly audit   'is-extglob': [ '2.1.1' ],
73 silly audit   'is-glob': [ '4.0.3' ],
73 silly audit   'is-number': [ '7.0.0' ],
73 silly audit   lilconfig: [ '2.0.6' ],
73 silly audit   merge2: [ '1.4.1' ],
73 silly audit   micromatch: [ '4.0.5' ],
73 silly audit   'mini-svg-data-uri': [ '1.4.4' ],
73 silly audit   minimist: [ '1.2.7' ],
73 silly audit   nanoid: [ '3.3.4' ],
73 silly audit   'node-releases': [ '2.0.8' ],
73 silly audit   'normalize-path': [ '3.0.0' ],
73 silly audit   'normalize-range': [ '0.1.2' ],
73 silly audit   'object-hash': [ '3.0.0' ],
73 silly audit   'path-parse': [ '1.0.7' ],
73 silly audit   picocolors: [ '1.0.0' ],
73 silly audit   picomatch: [ '2.3.1' ],
73 silly audit   pify: [ '2.3.0' ],
73 silly audit   'postcss-import': [ '14.1.0' ],
73 silly audit   'postcss-js': [ '4.0.0' ],
73 silly audit   'postcss-load-config': [ '3.1.4' ],
73 silly audit   'postcss-nested': [ '6.0.0' ],
73 silly audit   'postcss-selector-parser': [ '6.0.11' ],
73 silly audit   'postcss-value-parser': [ '4.2.0' ],
73 silly audit   'queue-microtask': [ '1.2.3' ],
73 silly audit   'quick-lru': [ '5.1.1' ],
73 silly audit   'read-cache': [ '1.0.0' ],
73 silly audit   readdirp: [ '3.6.0' ],
73 silly audit   resolve: [ '1.22.1' ],
73 silly audit   reusify: [ '1.0.4' ],
73 silly audit   rollup: [ '3.9.0' ],
73 silly audit   'run-parallel': [ '1.2.0' ],
73 silly audit   'source-map-js': [ '1.0.2' ],
73 silly audit   'supports-preserve-symlinks-flag': [ '1.0.0' ],
73 silly audit   tailwindcss: [ '3.2.4' ],
73 silly audit   'to-regex-range': [ '5.0.1' ],
73 silly audit   'toastify-js': [ '1.12.0' ],
73 silly audit   typescript: [ '4.9.4' ],
73 silly audit   'update-browserslist-db': [ '1.0.10' ],
73 silly audit   'util-deprecate': [ '1.0.2' ],
73 silly audit   xtend: [ '4.0.2' ],
73 silly audit   yaml: [ '1.10.2' ],
73 silly audit   flowbite: [ '1.6.3' ],
73 silly audit   postcss: [ '8.4.21' ],
73 silly audit   vite: [ '4.0.4' ]
73 silly audit }
74 verbose reify failed optional dependency /home/username/path/to/project/node_modules/fsevents
75 silly reify mark deleted [ '/home/username/path/to/project/node_modules/fsevents' ]
76 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/win32-x64
77 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/win32-x64' ]
78 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/win32-ia32
79 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/win32-ia32' ]
80 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/win32-arm64
81 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/win32-arm64' ]
82 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/sunos-x64
83 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/sunos-x64' ]
84 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/openbsd-x64
85 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/openbsd-x64' ]
86 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/netbsd-x64
87 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/netbsd-x64' ]
88 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/linux-s390x
89 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/linux-s390x' ]
90 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/linux-riscv64
91 silly reify mark deleted [
91 silly reify   '/home/username/path/to/project/node_modules/@esbuild/linux-riscv64'
91 silly reify ]
92 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/linux-ppc64
93 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/linux-ppc64' ]
94 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/linux-mips64el
95 silly reify mark deleted [
95 silly reify   '/home/username/path/to/project/node_modules/@esbuild/linux-mips64el'
95 silly reify ]
96 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/linux-loong64
97 silly reify mark deleted [
97 silly reify   '/home/username/path/to/project/node_modules/@esbuild/linux-loong64'
97 silly reify ]
98 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/linux-ia32
99 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/linux-ia32' ]
100 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/linux-arm64
101 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/linux-arm64' ]
102 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/linux-arm
103 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/linux-arm' ]
104 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/freebsd-x64
105 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/freebsd-x64' ]
106 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/freebsd-arm64
107 silly reify mark deleted [
107 silly reify   '/home/username/path/to/project/node_modules/@esbuild/freebsd-arm64'
107 silly reify ]
108 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/darwin-x64
109 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/darwin-x64' ]
110 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/darwin-arm64
111 silly reify mark deleted [
111 silly reify   '/home/username/path/to/project/node_modules/@esbuild/darwin-arm64'
111 silly reify ]
112 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/android-x64
113 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/android-x64' ]
114 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/android-arm64
115 silly reify mark deleted [
115 silly reify   '/home/username/path/to/project/node_modules/@esbuild/android-arm64'
115 silly reify ]
116 verbose reify failed optional dependency /home/username/path/to/project/node_modules/@esbuild/android-arm
117 silly reify mark deleted [ '/home/username/path/to/project/node_modules/@esbuild/android-arm' ]
118 timing reifyNode:node_modules/fsevents Completed in 152ms
119 timing reifyNode:node_modules/@esbuild/win32-x64 Completed in 149ms
120 timing reifyNode:node_modules/@esbuild/win32-ia32 Completed in 149ms
121 timing reifyNode:node_modules/@esbuild/win32-arm64 Completed in 149ms
122 timing reifyNode:node_modules/@esbuild/sunos-x64 Completed in 148ms
123 timing reifyNode:node_modules/@esbuild/openbsd-x64 Completed in 148ms
124 timing reifyNode:node_modules/@esbuild/netbsd-x64 Completed in 148ms
125 timing reifyNode:node_modules/@esbuild/linux-s390x Completed in 149ms
126 timing reifyNode:node_modules/@esbuild/linux-riscv64 Completed in 148ms
127 timing reifyNode:node_modules/@esbuild/linux-ppc64 Completed in 147ms
128 timing reifyNode:node_modules/@esbuild/linux-mips64el Completed in 147ms
129 timing reifyNode:node_modules/@esbuild/linux-loong64 Completed in 147ms
130 timing reifyNode:node_modules/@esbuild/linux-ia32 Completed in 147ms
131 timing reifyNode:node_modules/@esbuild/linux-arm64 Completed in 147ms
132 timing reifyNode:node_modules/@esbuild/linux-arm Completed in 147ms
133 timing reifyNode:node_modules/@esbuild/freebsd-x64 Completed in 148ms
134 timing reifyNode:node_modules/@esbuild/freebsd-arm64 Completed in 147ms
135 timing reifyNode:node_modules/@esbuild/darwin-x64 Completed in 147ms
136 timing reifyNode:node_modules/@esbuild/darwin-arm64 Completed in 147ms
137 timing reifyNode:node_modules/@esbuild/android-x64 Completed in 147ms
138 timing reifyNode:node_modules/@esbuild/android-arm64 Completed in 147ms
139 timing reifyNode:node_modules/@esbuild/android-arm Completed in 147ms
140 timing reifyNode:node_modules/run-parallel Completed in 1348ms
141 timing reifyNode:node_modules/read-cache Completed in 1343ms
142 timing reifyNode:node_modules/pify Completed in 1335ms
143 timing reifyNode:node_modules/path-parse Completed in 1333ms
144 timing reifyNode:node_modules/normalize-range Completed in 1330ms
145 timing reifyNode:node_modules/normalize-path Completed in 1329ms
146 timing reifyNode:node_modules/merge2 Completed in 1324ms
147 timing reifyNode:node_modules/is-number Completed in 1325ms
148 timing reifyNode:node_modules/is-extglob Completed in 1324ms
149 timing reifyNode:node_modules/glob-parent Completed in 1324ms
150 timing reifyNode:node_modules/color-name Completed in 1323ms
151 timing reifyNode:node_modules/to-regex-range Completed in 1366ms
152 timing reifyNode:node_modules/quick-lru Completed in 1353ms
153 timing reifyNode:node_modules/queue-microtask Completed in 1352ms
154 timing reifyNode:node_modules/postcss-nested Completed in 1349ms
155 timing reifyNode:node_modules/is-glob Completed in 1332ms
156 timing reifyNode:node_modules/is-binary-path Completed in 1333ms
157 timing reifyNode:node_modules/fill-range Completed in 1332ms
158 timing reifyNode:node_modules/didyoumean Completed in 1332ms
159 timing reifyNode:node_modules/camelcase-css Completed in 1332ms
160 timing reifyNode:node_modules/arg Completed in 1331ms
161 timing reifyNode:node_modules/anymatch Completed in 1332ms
162 timing reifyNode:node_modules/fast-glob/node_modules/glob-parent Completed in 1336ms
163 timing reifyNode:node_modules/chokidar/node_modules/glob-parent Completed in 1334ms
164 timing reifyNode:node_modules/util-deprecate Completed in 1382ms
165 timing reifyNode:node_modules/micromatch Completed in 1344ms
166 timing reifyNode:node_modules/xtend Completed in 1391ms
167 timing reifyNode:node_modules/readdirp Completed in 1374ms
168 timing reifyNode:node_modules/picocolors Completed in 1362ms
169 timing reifyNode:node_modules/has Completed in 1351ms
170 timing reifyNode:node_modules/binary-extensions Completed in 1349ms
171 timing reifyNode:node_modules/update-browserslist-db Completed in 1396ms
172 timing reifyNode:node_modules/mini-svg-data-uri Completed in 1358ms
173 timing reifyNode:node_modules/lilconfig Completed in 1359ms
174 timing reifyNode:node_modules/postcss-js Completed in 1384ms
175 timing reifyNode:node_modules/dlv Completed in 1367ms
176 timing reifyNode:node_modules/cssesc Completed in 1367ms
177 timing reifyNode:node_modules/object-hash Completed in 1381ms
178 timing reifyNode:node_modules/reusify Completed in 1400ms
179 timing reifyNode:node_modules/postcss-load-config Completed in 1391ms
180 timing reifyNode:node_modules/escalade Completed in 1373ms
181 timing reifyNode:node_modules/supports-preserve-symlinks-flag Completed in 1411ms
182 timing reifyNode:node_modules/node-releases Completed in 1384ms
183 timing reifyNode:node_modules/postcss-import Completed in 1395ms
184 timing reifyNode:node_modules/is-core-module Completed in 1380ms
185 timing reifyNode:node_modules/postcss-value-parser Completed in 1404ms
186 timing reifyNode:node_modules/function-bind Completed in 1394ms
187 timing reifyNode:node_modules/fraction.js Completed in 1394ms
188 timing reifyNode:node_modules/defined Completed in 1394ms
189 timing reifyNode:node_modules/browserslist Completed in 1394ms
190 timing reifyNode:node_modules/braces Completed in 1397ms
191 timing reifyNode:node_modules/picomatch Completed in 1424ms
192 timing reifyNode:node_modules/esbuild Completed in 1411ms
193 timing reifyNode:node_modules/chokidar Completed in 1410ms
194 timing reifyNode:node_modules/acorn-walk Completed in 1419ms
195 timing reifyNode:node_modules/fastq Completed in 1425ms
196 timing reifyNode:node_modules/toastify-js Completed in 1474ms
197 timing reifyNode:node_modules/@nodelib/fs.stat Completed in 1437ms
198 timing reifyNode:node_modules/electron-to-chromium Completed in 1452ms
199 timing reifyNode:node_modules/source-map-js Completed in 1497ms
200 timing reifyNode:node_modules/minimist Completed in 1469ms
201 timing reifyNode:node_modules/nanoid Completed in 1472ms
202 timing reifyNode:node_modules/@nodelib/fs.scandir Completed in 1466ms
203 timing reifyNode:node_modules/@nodelib/fs.walk Completed in 1475ms
204 timing reifyNode:node_modules/acorn-node Completed in 1487ms
205 timing reifyNode:node_modules/detective Completed in 1503ms
206 timing reifyNode:node_modules/postcss-selector-parser Completed in 1541ms
207 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 1610ms
208 timing auditReport:getReport Completed in 1631ms
209 silly audit report {}
210 timing auditReport:init Completed in 0ms
211 timing reify:audit Completed in 1633ms
212 timing reifyNode:node_modules/postcss Completed in 1619ms
213 timing reifyNode:node_modules/fast-glob Completed in 1580ms
214 timing reifyNode:node_modules/acorn Completed in 1586ms
215 timing reifyNode:node_modules/yaml Completed in 1651ms
216 timing reifyNode:node_modules/autoprefixer Completed in 1614ms
217 timing reifyNode:node_modules/rollup Completed in 1710ms
218 timing reifyNode:node_modules/resolve Completed in 1763ms
219 timing reifyNode:node_modules/vite Completed in 1806ms
220 timing reifyNode:node_modules/@popperjs/core Completed in 1936ms
221 timing reifyNode:node_modules/@esbuild/linux-x64 Completed in 2078ms
222 timing reifyNode:node_modules/tailwindcss Completed in 2144ms
223 timing reifyNode:node_modules/flowbite Completed in 2195ms
224 timing reifyNode:node_modules/caniuse-lite Completed in 2240ms
225 timing reifyNode:node_modules/typescript Completed in 2605ms
226 timing reify:unpack Completed in 2616ms
227 timing reify:unretire Completed in 1ms
228 timing build:queue Completed in 9ms
229 timing build:link:node_modules/acorn Completed in 11ms
230 timing build:link:node_modules/autoprefixer Completed in 10ms
231 timing build:link:node_modules/browserslist Completed in 10ms
232 timing build:link:node_modules/cssesc Completed in 10ms
233 timing build:link:node_modules/esbuild Completed in 10ms
234 timing build:link:node_modules/detective Completed in 10ms
235 timing build:link:node_modules/nanoid Completed in 9ms
236 timing build:link:node_modules/mini-svg-data-uri Completed in 10ms
237 timing build:link:node_modules/resolve Completed in 9ms
238 timing build:link:node_modules/rollup Completed in 9ms
239 timing build:link:node_modules/tailwindcss Completed in 9ms
240 timing build:link:node_modules/typescript Completed in 8ms
241 timing build:link:node_modules/update-browserslist-db Completed in 8ms
242 timing build:link:node_modules/vite Completed in 8ms
243 timing build:link Completed in 12ms
244 info run esbuild@0.16.12 postinstall node_modules/esbuild node install.js
245 info run esbuild@0.16.12 postinstall { code: 1, signal: null }
246 timing reify:rollback:createSparse Completed in 352ms
247 timing reify:rollback:retireShallow Completed in 0ms
248 timing command:install Completed in 4034ms
249 verbose stack Error: command failed
249 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
249 verbose stack     at ChildProcess.emit (node:events:513:28)
249 verbose stack     at maybeClose (node:internal/child_process:1098:16)
249 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:304:5)
250 verbose pkgid esbuild@0.16.12
251 verbose cwd /home/username/path/to/project
252 verbose Linux 6.1.7-arch1-1
253 verbose node v19.4.0
254 verbose npm  v8.19.2
255 error code 1
256 error path /home/username/path/to/project/node_modules/esbuild
257 error command failed
258 error command sh -c -- node install.js
259 error /home/username/path/to/project/node_modules/esbuild/install.js:94
259 error     throw new Error(`Expected ${JSON.stringify("0.16.12")} but got ${JSON.stringify(stdout)}`);
259 error           ^
259 error
259 error Error: Expected "0.16.12" but got "0.17.3"
259 error     at validateBinaryVersion (/home/username/path/to/project/node_modules/esbuild/install.js:94:11)
259 error     at /home/username/path/to/project/node_modules/esbuild/install.js:241:5
259 error
259 error Node.js v19.4.0
260 verbose exit 1
261 timing npm Completed in 4209ms
262 verbose unfinished npm timer reify 1674515119841
263 verbose unfinished npm timer reify:build 1674515122977
264 verbose unfinished npm timer build 1674515122978
265 verbose unfinished npm timer build:deps 1674515122978
266 verbose unfinished npm timer build:run:postinstall 1674515123000
267 verbose unfinished npm timer build:run:postinstall:node_modules/esbuild 1674515123000
268 verbose code 1
269 error A complete log of this run can be found in:
269 error     /home/username/.npm/_logs/2023-01-23T23_05_19_669Z-debug-0.log

I've tried things as in #1711 (comment):

  1. if I run npm i esbuild@0.16.12, it complains: Error: Expected "0.17.4" but got "0.17.3";
    • I hoped this one would work as I'm telling it to install the version it's expecting in the error up on top;
  2. if I run npm i esbuild@0.13.3 (as in the comment), it complains: Error: Expected "0.13.3" but got "0.17.3";
    • I ran this one just as an experiment, but it does not want to install even a much older version;
  3. if I run npm i esbuild@0.17.3, it complains: Error: Expected "0.16.17" but got "0.17.3";
    • I hoped this one would work as I'm telling it to go with the current version on the machine;
    • this one also appears if I try to run npm update;
    • interestingly it's a different 0.16.* version this time;
  4. if I then run npm i esbuild@0.16.17, it complains: Error: Expected "0.16.17" but got "0.17.3";
    • I hoped this one would work as I'm telling it to install the version it's expecting in the previous error;
    • yet this is the same error as the previous error;
  5. if I run npm i esbuild@0.17.4, which is the newest version, it complains: Error: Expected "0.17.4" but got "0.17.3";
    • I hoped this one would work as I'm telling it to install the newest version;
    • this one also appears if I try to install from the .tar.gz file of 0.17.4.

I am on Arch Linux, fully updated at the moment, 6.1.7-arch1-1.

  • running pacman -Q | grep esbuild gives esbuild 0.17.3-1, as expected because every error says got "0.17.3";
  • running npm show esbuild gives latest: 0.17.4 among other things, but as written above, I am unable get the latest version;
  • running npm-check-updates does not detect esbuild being newer, only other software, which cannot be updated because of the error above.

This happens in any project. Everything worked three days ago and npm show esbuild says the latest version came out two days ago.

Is this a problem with the software or with my own inexperience with it? What steps should I take to make these projects usable again? Or is this out of my control, maybe something that'll sort itself through time and updates?

If you need any other outputs, please tell me which commands you need me to run, and excuse any problems with my English as it's not my native language.

@hyrious
Copy link

hyrious commented Jan 24, 2023

Could you check if there is an env ESBUILD_BINARY_PATH? If set, esbuild will use that binary instead of the one in node_modules then the postinstall script in esbuild will find the version mismatch.

I guess this is probably caused by your system level esbuild was installed by pacman, which sets that env variable.

@evanw
Copy link
Owner

evanw commented Jan 24, 2023

Yes, this sounds like another problem caused by this. They really should not be doing that. ESBUILD_BINARY_PATH is a low-level environment variable that only exists to be able to debug esbuild using a locally-built Go executable. It's not supposed to be forced on users like this. I may have to remove ESBUILD_BINARY_PATH so I stop getting these bug reports (from Arch Linux users?). It will make debugging esbuild harder, but that's life. Hmm.

I'm not sure what you should do about this. I'm not at all familiar with Arch Linux. If possible, removing the package with that shell script that set the ESBUILD_BINARY_PATH environment variable should fix it. If that's not possible, you could also try manually erasing ESBUILD_BINARY_PATH before running esbuild.

unfortunately the Details section on GitHub does not seem to support code block formatting

Markdown has a strange quirk where if you mix HTML and Markdown, there has to be a blank line in between the HTML and the Markdown (or vice versa). So like this:

<details><summary>...</summary>

```
    ...
```

</details>

not like this:

<details><summary>...</summary>
```
    ...
```
</details>

@5ucur
Copy link
Author

5ucur commented Jan 24, 2023

Could you check if there is an env ESBUILD_BINARY_PATH? If set, esbuild will use that binary instead of the one in node_modules then the postinstall script in esbuild will find the version mismatch.

Running echo $ESBUILD_BINARY_PATH returns /usr/bin/esbuild.

I guess this is probably caused by your system level esbuild was installed by pacman, which sets that env variable.

I don't recall installing this software on my own, if pacman installed it then it must have been a dependency of something.


I'm not sure what you should do about this. I'm not at all familiar with Arch Linux.

A friend has complained about similar problems, on a Windows machine. I've asked them to run npm install and send me the output, as I'm suspecting they might be facing the same issue, though we cannot tell until they send me the output. But it's just a small possibility that it's not just Arch Linux.

If possible, removing the package with that shell script that set the ESBUILD_BINARY_PATH environment variable should fix it. If that's not possible, you could also try manually erasing ESBUILD_BINARY_PATH before running esbuild.

Running pkgfile esbuild, which should return which package contains esbuild, returns nothing. But running pacman -R esbuild does prompt for removal of the package. I will update after trying that, hopefully I don't mess up my system more. Looking into it more, it seems that esbuild is merely a make dependency for webcord, so it'll probably not be an issue.

And thanks for the info about the markdown-html stuff, and editing my comment yourself!

@5ucur
Copy link
Author

5ucur commented Jan 24, 2023

Yes, that was it. I ran yay -Yc to remove make dependencies and freed up about half a gig, including esbuild 0.17.3-1. A reboot later, npm commands work and echo $ESBUILD_BINARY_PATH returns nothing.

Solved! Thanks for your assistance.

@5ucur 5ucur closed this as completed Jan 24, 2023
dundee added a commit to dundee/pkgbuilds that referenced this issue Feb 1, 2023
fix: do not set ESBUILD_BINARY_PATH

see: evanw/esbuild#2865 (comment)
dundee added a commit to dundee/pkgbuilds that referenced this issue Feb 1, 2023
fix: do not set ESBUILD_BINARY_PATH

see: evanw/esbuild#2865 (comment)
@dundee
Copy link

dundee commented Feb 1, 2023

FYI: AUR package has been just fixed (0.17.5-2).

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

4 participants