Comments (9)
@zachariahtimothy Okay I see, the problem is that for some reason the user installing the javascript dependencies (www-app
) does not have the permissions required to create the node_modules
folder. It's odd since there is a line in the node Dockerfile that gives full permissions to the executing user on the mounted app folder 🤔
It's not a long-term fix but to allow you to use NoDock for the moment, from your host machine in your project folder run:
mkdir node_modules
chmod -R 777 node_modules
cd nodock/
docker-compose down && docker-compose up --build -d node nginx
If that doesn't work, try purging everything.
WARNING: this will destroy every container/image/volume on your machine
docker stop $(docker ps -qa); docker rm -f $(docker ps -qa); docker rmi $(docker images -q); docker volume rm $(docker volume ls -q)
And running.
docker-compose up --build -d node nginx
Let me know if this helps!
from nodock.
@imnotteixeira I'll take a look at a permanent fix tomorrow
from nodock.
@zachariahtimothy thanks for using NoDock and creating an issue, try running docker-compose down && docker-compose up --build -d node nginx
from the NoDock folder.
I have not been able to replicate the issue so I'll need a few info from you:
- Docker/Docker-Compose versions
- Host OS + Version
Was there anything in the project folder before you cloned nodock?
from nodock.
Thank you for the reply @philtrep , I think this approach is AMAZING and am really excited to get it working. Using the method you describe, I now get the following errors
npm WARN using --force I sure hope you know what you are doing.
npm WARN checkPermissions Missing write access to /opt/app
npm WARN [email protected] No repository field.
npm ERR! path /opt/app/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/opt/app/node_modules'
npm ERR! { Error: EACCES: permission denied, mkdir '/opt/app/node_modules'
npm ERR! cause:
npm ERR! { Error: EACCES: permission denied, mkdir '/opt/app/node_modules'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/opt/app/node_modules' },
npm ERR! stack: 'Error: EACCES: permission denied, mkdir \'/opt/app/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/opt/app/node_modules',
npm ERR! parent: 'example-simple-web-node-docker' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/www-app/.npm/_logs/2018-02-27T17_49_23_212Z-debug.log
module.js:559
throw err;
^
Error: Cannot find module 'express'
at Function.Module._resolveFilename (module.js:557:15)
at Function.Module._load (module.js:484:25)
at Module.require (module.js:606:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/app/index.js:1:77)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
System info:
- Docker version 18.02.0-ce, build fc4de44 / docker-compose version 1.19.0, build 9e633ef
- MacOS V 10.13.3
from nodock.
@zachariahtimothy Any success? 😄
from nodock.
Hi, I've been having the exact same problem, and I can confirm that the hotfix does work, however, it is not ideal because everytime I clone the repo, that must be done, as the permissions are not correct. By inspecting the Dockerfile and scripts, as well as the logs, I found out that the www-app user has no write access to /opt/app
The line that you referenced chmod 777 /home/www-app -R
gives permissions to the /home/www-app folder as far as I know, however it does not solve the problem as there are no permissions to /opt/app folder. If you could help on this I'd be grateful. 👍
from nodock.
@philtrep I was able to reproduce @zachariahtimothy 's error and successfully used your patch from Feb to fix it. Do keep us posted about solution.
from nodock.
@imnotteixeira @MJGTwo sorry guys, work has been a lil crazy as of late and my open source contributions have suffered.
I am unable to replicate the error but I'll bet that #109 fixes it.
Let me know how it goes 😄
from nodock.
Has similar error. Fixed with move https://github.com/Osedea/nodock/pull/109/files#diff-fd862f8df18ad438a72182fe51f139d1R19 on 13 line (before if [[ $YARN = true ]]; then
).
from nodock.
Related Issues (20)
- nginx 502 error HOT 3
- Move docker-compose.yml variables to .env file HOT 1
- Error building nginx service HOT 2
- Support angular 5 hosted with nginx HOT 2
- Setup for a client (browser) application
- Certbot with Nginx HOT 1
- Several Trials: Dead End: no such file or directory, open '/opt/app/package.json' HOT 2
- using Digitcert ssl certificates
- NGINX build fails on Windows 10 HOT 4
- mongodb container automatically shutting down
- Can you please add a new container for phpmyadmin to this setup.
- Can we run the node container with PM2?
- Run development with nodemon? HOT 1
- Project files permissions HOT 4
- Mongod permission issue
- Add PostGIS to the PostgreSQL image
- why mount logs on volume? HOT 4
- Remove TLS 1.0 from NGINX conf
- Remove mounted volume for logs
- Add ELK stack image HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodock.