BugSplat-Git / symbol-upload

Cross-platform symbol upload utility
MIT License
10 stars 3 forks source link

Cannot find module 'node-dump-syms' #140

Closed ariffammobox closed 1 month ago

ariffammobox commented 1 month ago

We're receiving this error when running npm run sea:windows after npm ci.

Using node v22.8.0 with symbol-upload at v10.1.1. Works fine on v10.0.1

> @bugsplat/symbol-upload@10.1.1 presea:windows
> npm run build:sea

> @bugsplat/symbol-upload@10.1.1 prebuild:sea
> npm run clean

> @bugsplat/symbol-upload@10.1.1 clean
> rimraf ./dist

> @bugsplat/symbol-upload@10.1.1 build:sea
> run-s ncc bpkg:compression bpkg:node-dump-syms

> @bugsplat/symbol-upload@10.1.1 ncc
> npx ncc build ./bin/index.ts -o ./dist

ncc: Version 0.38.1
ncc: Compiling file index.js into CJS
ncc: Using typescript@5.6.2 (local user-provided)
Error: [tsl] ERROR in C:\...\symbol-upload\src\preload.ts(1,31)
      TS2307: Cannot find module 'node-dump-syms' or its corresponding type declarations.
[tsl] ERROR in C:\...\symbol-upload\src\preload.ts(15,23)
      TS2307: Cannot find module 'node-dump-syms' or its corresponding type declarations.
    at C:\...\symbol-upload\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:38:1896272
    at C:\...\symbol-upload\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:38:396262
    at _done (eval at create (C:\...\symbol-upload\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:21:75523), <anonymous>:9:1)
    at eval (eval at create (C:\...\symbol-upload\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:21:75523), <anonymous>:34:22)
ERROR: "ncc" exited with 1.
bobbyg603 commented 1 month ago

Hi @ariffammobox we've run into some issues with optional dependencies and node-pre-gyp. can you please send the output of npm i --verbose?

ariffammobox commented 1 month ago

Here's the output.

npm verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
npm info using npm@10.8.2
npm info using node@v22.8.0
npm verbose title npm i
npm verbose argv "i" "--loglevel" "verbose"
npm verbose logfile logs-max:10 dir:C:\Windows\system32\config\systemprofile\AppData\Local\npm-cache\_logs\2024-09-23T02_55_22_750Z-
npm verbose logfile C:\Windows\system32\config\systemprofile\AppData\Local\npm-cache\_logs\2024-09-23T02_55_22_750Z-debug-0.log     
npm info run node-dump-syms@3.0.10 install node_modules/node-dump-syms npx @mapbox/node-pre-gyp install --fallback-to-build=false || npm run build:client
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 336ms
npm info run node-dump-syms@3.0.10 install { code: 4294963238, signal: null }
npm verbose reify failed optional dependency C:\BuildAgent\work\83270cf51356ee9c\symbol-upload\node_modules\node-dump-syms

up to date, audited 377 packages in 3s

84 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm verbose cwd C:\BuildAgent\work\83270cf51356ee9c\symbol-upload
npm verbose os Windows_NT 10.0.19045
npm verbose node v22.8.0
npm verbose npm  v10.8.2
npm verbose exit 0
npm info ok
bobbyg603 commented 1 month ago

Here's the output.


npm verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js

npm info using npm@10.8.2

npm info using node@v22.8.0

npm verbose title npm i

npm verbose argv "i" "--loglevel" "verbose"

npm verbose logfile logs-max:10 dir:C:\Windows\system32\config\systemprofile\AppData\Local\npm-cache\_logs\2024-09-23T02_55_22_750Z-

npm verbose logfile C:\Windows\system32\config\systemprofile\AppData\Local\npm-cache\_logs\2024-09-23T02_55_22_750Z-debug-0.log     

npm info run node-dump-syms@3.0.10 install node_modules/node-dump-syms npx @mapbox/node-pre-gyp install --fallback-to-build=false || npm run build:client

npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 336ms

npm info run node-dump-syms@3.0.10 install { code: 4294963238, signal: null }

npm verbose reify failed optional dependency C:\BuildAgent\work\83270cf51356ee9c\symbol-upload\node_modules\node-dump-syms

up to date, audited 377 packages in 3s

84 packages are looking for funding

  run `npm fund` for details

found 0 vulnerabilities

npm verbose cwd C:\BuildAgent\work\83270cf51356ee9c\symbol-upload

npm verbose os Windows_NT 10.0.19045

npm verbose node v22.8.0

npm verbose npm  v10.8.2

npm verbose exit 0

npm info ok

We saw a similar issue with Teamcity. Try going into your agent setting and remove the build caches and do a clean build for this project. If that doesn't work, try installing node-dump-syms separately and before installing everything else.

ariffammobox commented 1 month ago

Clean build doesn't work, but a complete re-installation of nodejs itself seems to fix this issue. Thanks!