help
help copied to clipboard
docker-compose on ARM64 CPU
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.
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)
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.
Closing after no activity on this issue for 12 months.