help icon indicating copy to clipboard operation
help copied to clipboard

docker-compose on ARM64 CPU

Open Shahin-rmz opened this issue 3 years ago • 1 comments

Details

Hello I am usingm docker-compose of the documentation to deploy node-js. Here is the doc that I am following. I get the following problem

Attaching to svelte1_node_1
node_1  | npm ERR! code ENOENT
node_1  | npm ERR! syscall open
node_1  | npm ERR! path /home/node/app/package.json
node_1  | npm ERR! errno -2
node_1  | npm ERR! enoent ENOENT: no such file or directory, open '/home/node/app/package.json'
node_1  | npm ERR! enoent This is related to npm not being able to find a file.
node_1  | npm ERR! enoent
node_1  |
node_1  | npm ERR! A complete log of this run can be found in:
node_1  | npm ERR!     /home/node/.npm/_logs/2022-07-31T13_54_31_695Z-debug.log

Node.js version

8

Example code

  0 version: "2"
  1 services:
  2   node:
  3     image: "node:8"
  4     user: "node"
  5     working_dir: /home/node/app
  6     environment:
  7       - NODE_ENV=production
  8     volumes:
  9       - ./:/home/node/app
 10     ports:
 11       - 8195:8081
 12     command: "npm start"

Operating system

Linux debian based 64 bit ARM

Scope

installation, deployment

Module and version

Not applicable.

Shahin-rmz avatar Jul 31 '22 14:07 Shahin-rmz

The error seems to indicate that there is no package.json file in the current directory where you are running the docker-compose up command.

Do you have a package.json file in your current directory with a 'start' script defined?

Docker Compose example mounts your current directory (including node_modules) to the container. It assumes that your application has a file named package.json defining start script.

(Quote from the link you gave: https://github.com/nodejs/docker-node/blob/main/README.md#how-to-use-this-image)

vivganes avatar Aug 11 '22 18:08 vivganes

There has been no activity on this issue for 11 months. The help repository works best when sustained engagement moves conversation forward. The issue will be closed in 1 month. If you are still experiencing this issue on the latest supported versions of Node.js, please leave a comment.

github-actions[bot] avatar Nov 30 '23 01:11 github-actions[bot]

Closing after no activity on this issue for 12 months.

github-actions[bot] avatar Dec 31 '23 01:12 github-actions[bot]