evidence-dev / docker-devenv

This repo builds a Docker image whose container instances can be used as a development environment for Evidence projects via a mounted directory
MIT License
11 stars 6 forks source link

NPM error on container start. #15

Open dean-boi opened 5 months ago

dean-boi commented 5 months ago

Hi, I tried pulling / running the docker image with the --init flag as described in the README...

cd <path-to-your-evidence-project-root> docker run -v=$(pwd):/evidence-workspace -p=3000:3000 -it --rm evidencedev/devenv:latest --init

... though it gives me the below npm error:

Starting Evidence.dev development environment mounted on /evidence-workspace in the container.
Provided arguments => --init
Starting with a blank template project.
npm info using npm@9.5.1
npm info using node@v18.16.0
! destination directory is not empty, aborting. Use --force to override
Running command => npm run dev -- --host 0.0.0.0
npm info using npm@9.5.1
npm info using node@v18.16.0
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /evidence-workspace/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/evidence-workspace/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2024-04-17T08_08_41_677Z-debug-0.log
mdopp commented 4 months ago

just an idea: Are you using windows / wsl? if so, replace $(pwd) with something like the windows directory, but double-backslash

c:\\Users\\xyz\\dev\\something