janoside / btc-rpc-explorer

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

Podman build fails - This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@2 #449

Closed larwood closed 2 years ago

larwood commented 2 years ago

Describe the bug

Building on Fedora 36 with podman fails. This could be user error but I have built many times successfully in the last year but this is the first time with Fedora 36.

Running btc-rpc-explorer from the directory directly with 'npm install; npm start' was successful.

I managed to resolve the issue and build successfully by updating the Dockerfile

# diff Dockerfile Dockerfile_backup-2022-06-06 
1c1
< FROM node:16 as builder
---
> FROM node:14 as builder
6c6
< FROM node:16-alpine
---
> FROM node:14-alpine

Environment (please complete the following information):

Configuration file content

Submission of configuration files did not seem relevant to the issue so I have not included. Happy to add if requested.

To Reproduce

Steps to reproduce the behavior:

# podman build -t btc-rpc-explorer_`date +%F` .
[1/2] STEP 1/4: FROM node:14 AS builder
[1/2] STEP 2/4: WORKDIR /workspace
--> 91a20795e6c
[1/2] STEP 3/4: COPY . .
--> cb74b73daef
[1/2] STEP 4/4: RUN 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!
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!
npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/bson-93debf91/lib/bson.js'
npm WARN tar ENOENT: no such file or directory, lstat '/workspace/node_modules/.staging/bson-93debf91/lib/parser'
npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/bson-93debf91/lib/code.js'
npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/bson-93debf91/lib/constants.js'
npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/bson-93debf91/lib/db_ref.js'
npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/bson-93debf91/lib/decimal128.js'
npm WARN tar ENOENT: no such file or directory, lstat '/workspace/node_modules/.staging/bson-93debf91/lib/parser'
npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/bson-93debf91/lib/double.js'
npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/bson-93debf91/lib/ensure_buffer.js'
npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/bson-93debf91/lib/error.js'
...
Error: error building at STEP "RUN npm install": error while running runtime: exit status 1

Screenshots or Log Output

See above

Additional context

None