Docker build error: - npm ERR! Maximum call stack size exceeded

Viewed 388

I want to create docker image using below Dockerfile, but gives me "npm ERR! Maximum call stack size exceeded" error but the same dockerfile if I run in my local mac machine it works fine.

Dockerfile :-

FROM node:10
WORKDIR /usr/src/app/
#COPY package*.json /usr/src/app/
COPY . /usr/src/app/
RUN npm install

Files available in the Dockerfiles folder are :-

Dockerfile  README.md  codegen.yml  package-lock.json  package.json  public  src  tsconfig.json

My Host System Specification:-

[root@workspace-frontend]# free -h
              total        used        free      shared  buff/cache   available
Mem:            15G        3.6G        840M        141M         11G         12G
Swap:            0B          0B          0B

Host operation system:-

Operating System: Amazon Linux 2

Note :- I already delete package-lock.json and check the status but it won't work for me.

0 Answers
Related