npm unable to find correct version of package within Docker

18
May 15, 2019, at 7:30 PM

I am attempting to perform npm install within a docker image. As part of the package.json, I need version 1.8.8 of react-pattern-library. Within the docker image, only version 0.0.1 appears to be available.

If I locally run

npm view react-pattern-library versions

I can see version 1.8.8

However the same command within my docker file only show version 0.0.1

Can anyone tell me what configuration setting I need to be able to find the correct version when attempting my docker build?

docker build -t jhutc/molly-ui

Contents of Dockerfile

FROM node:10
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
#COPY package*.json ./
COPY package.json ./
RUN npm set strict-ssl false
ENV HTTP_PROXY="http://proxy.company.com:8080"
ENV HTTPS_PROXY="https://proxy.company.com:8080"
RUN echo $HTTP_PROXY
RUN echo $HTTPS_PROXY
RUN npm view react-pattern-library versions
#RUN npm install
Answer 1

Try deleting the package-lock.json and running npm install again.

READ ALSO
Redis Stream with Node XADD

Redis Stream with Node XADD

How can one use Redis stream in redis-node

38
How resolve Operations and Map with GraphQL-js?

How resolve Operations and Map with GraphQL-js?

basically im trying upload a file with GraphQl js vanilla, but i dont know how resolve operations and map

33
puppeteer issue on CentOs 7 problem after exactly 30 minutes

puppeteer issue on CentOs 7 problem after exactly 30 minutes

i have a script that use node js and puppeteer, the script run wonderful on my windows 10 for as long as i dont close it from command line, when i`m using it

25