janoside / btc-rpc-explorer

Database-free, self-hosted Bitcoin explorer, via RPC to Bitcoin Core.
https://bitcoinexplorer.org
MIT License
1.5k stars 1.11k forks source link

crash on npm install current master 48df5b5 #445

Closed pointbiz closed 2 years ago

pointbiz commented 2 years ago

Describe the bug

get the master branch at the git hash above. then npm install and it crashes

Environment (please complete the following information):

Configuration file content Same content as v3.3.0 release.

To Reproduce

Steps to reproduce the behavior:

  1. get the master branch at 48df5b5
  2. npm install
  3. See error

Screenshots or Log Output

npm WARN tar ENOENT: no such file or directory, open '/home/linuxguy/code/btc-rpc-explorer/node_modules/.staging/ms-3d309320/index.js' npm WARN tar ENOENT: no such file or directory, open '/home/linuxguy/code/btc-rpc-explorer/node_modules/.staging/node-abi-8eb61ad1/LICENSE' npm WARN tar ENOENT: no such file or directory, open '/home/linuxguy/code/btc-rpc-explorer/node_modules/.staging/ms-3d309320/package.json' npm WARN tar ENOENT: no such file or directory, open '/home/linuxguy/code/btc-rpc-explorer/node_modules/.staging/node-abi-8eb61ad1/index.js'

Additional context

npm start Then you get this output: npm start

btc-rpc-explorer@3.3.0 start /home/linuxguy/code/btc-rpc-explorer node ./bin/www

btcexp:app Searching for config files... +0ms btcexp:app Config file found at /home/linuxguy/.config/btc-rpc-explorer.env, loading... +2ms btcexp:app Config file not found at /etc/btc-rpc-explorer/.env, continuing... +1ms btcexp:app Config file not found at /home/linuxguy/code/btc-rpc-explorer/.env, continuing... +0ms internal/modules/cjs/loader.js:905 throw err; ^

Error: Cannot find module '@janoside/app-utils' Require stack:

janoside commented 2 years ago

@pointbiz I'm not able to reproduce this right now. That commit is what's currently running in production. Can you maybe try another npm install? The module referenced in the error ("@janoside/app-utils") is listed here, and that commit definitely exists in that referenced repository, so I'm not sure what the problem is. Also, any additional context to help me try to reproduce would be great.

pointbiz commented 2 years ago

I cannot build this commit #5740b0572bbc14ab3175482092f1c7efbe87fdc5 I can build the commit before it #a0bb1e4fb29c600db9dd673c2598b7a190cd77c0

It freezes on this step of npm install:

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@2. I'll try to do my best with it! [ ......] / extract:aws-sdk: sill extract aws-sdk@2.1124.0 extracted to /ho

pointbiz commented 2 years ago

I'm wondering if this is because I'm on npm v6... maybe I need to update to npm v8

pointbiz commented 2 years ago

Yes it was because I was using npm v6 it now builds on npm v8. Now I get the issue #443

pointbiz commented 2 years ago

Based on this source it looks like npm v7 is now required for the lockfileversion2 https://www.abrahamberg.com/blog/npm-package-json-lock-version-1-or-2/

This requirement could be added to the README