# Error Enoent when trying to deploy

**URL:** <https://community.fly.io/t/error-enoent-when-trying-to-deploy/16956>\
**Category:** General\
**Tags:** login-only\
**Created:** [November 26, 2023, 2:32pm UTC](https://community.fly.io/t/error-enoent-when-trying-to-deploy/16956 "2023-11-26T14:32:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shel-bernstein](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/shel-bernstein/32/15829_2.png) [@shel-bernstein](https://community.fly.io/u/shel-bernstein)\
**Post date:** [November 26, 2023, 2:32pm UTC](https://community.fly.io/t/error-enoent-when-trying-to-deploy/16956/1 "2023-11-26T14:32:38Z")

</div>

> **[GitHub - adnanwahab/Simple-GPU: 🦒 Functional WebGPU](https://github.com/adnanwahab/Simple-GPU)**
>
> 🦒 Functional WebGPU. Contribute to adnanwahab/Simple-GPU development by creating an account on GitHub.

this is my github repo, i’m trying to deploy a simple dockerfile to start vite on port 3000

but i am getting this error

2023-11-26T14:32:23.498 app[2865339fe20568] dfw [info] npm ERR! code ENOENT

2023-11-26T14:32:23.499 app[2865339fe20568] dfw [info] npm ERR! syscall open

2023-11-26T14:32:23.500 app[2865339fe20568] dfw [info] npm ERR! path /package.json

2023-11-26T14:32:23.500 app[2865339fe20568] dfw [info] npm ERR! errno -2

2023-11-26T14:32:23.502 app[2865339fe20568] dfw [info] npm ERR! enoent Could not read package.json: Error: ENOENT: no such file or directory, open ‘/package.json’

2023-11-26T14:32:23.502 app[2865339fe20568] dfw [info] npm ERR! enoent This is related to npm not being able to find a file.

2023-11-26T14:32:23.503 app[2865339fe20568] dfw [info] npm ERR! enoent

2023-11-26T14:32:23.504 app[2865339fe20568] dfw [info] npm ERR! A complete log of this run can be found in: /root/.npm/\_logs/2023-11-26T14\_32\_23\_262Z-debug-0.log

---

<div class="post-metadata">

**Author:** ![shel-bernstein](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/shel-bernstein/32/15829_2.png) [@shel-bernstein](https://community.fly.io/u/shel-bernstein)\
**Post date:** [November 26, 2023, 2:38pm UTC](https://community.fly.io/t/error-enoent-when-trying-to-deploy/16956/2 "2023-11-26T14:38:13Z")

</div>

# Use an official Node runtime as a parent image

FROM node:14

# Set the working directory in the container

WORKDIR /usr/src/app

# Copy package.json and package-lock.json (or yarn.lock)

#COPY package.json ./

COPY ./package.json /usr/src/app/

RUN ls -la

# Install project dependencies

RUN npm install

# Bundle app source inside the Docker image

COPY . .

# Build your app

RUN npm run build

# Your app runs on port 3000, so expose this port

EXPOSE 3000

# Define the command to run your app (adjust the start script according to your project)

CMD [“npm”, “run”, “start”]

This is my dockerfile

---

<div class="post-metadata">

**Author:** ![rubys](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/rubys/32/16907_2.png) [@rubys](https://community.fly.io/u/rubys)\
**Post date:** [November 26, 2023, 4:32pm UTC](https://community.fly.io/t/error-enoent-when-trying-to-deploy/16956/3 "2023-11-26T16:32:39Z")

</div>

> [@shel-bernstein](#):
>
> /package.json

Note that there is a leading slash in this line. Something you are running is looking for `package.json` is the root directory of the file system.

The way I typically debug these types of situations is to run `fly console` which will launch an ephemeral machine and you will be logged in as root. From there you can look around, and run commands.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [December 3, 2023, 4:33pm UTC](https://community.fly.io/t/error-enoent-when-trying-to-deploy/16956/4 "2023-12-03T16:33:40Z")

</div>

Closed on December 3, 2023, 4:33pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
