I'm going through an introductory Docker course, and it's instructing me to create a docker file where I'm encountering the error
Error: Cannot find module '/app/NPM'
when I run the command:
docker run -it -p 3000:3000 3ce0a937488d
The command to install the app on my local system is:
npx create-react-app frontend
This is Dockerfile.dev:
WORKDIR '/app'
COPY package.json .
RUN npm install
COPY . .
CMD ["NPM", "RUN", "START"]
This is the build command:
docker build -f ./Dockerfile.dev .
The full error message from the running the image is this:
node:internal/modules/cjs/loader:922
throw err;
^
Error: Cannot find module '/app/NPM'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:15)
at Function.Module._load (node:internal/modules/cjs/loader:763:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Any ideas?