Git Product home page Git Product logo

Comments (9)

philtrep avatar philtrep commented on May 21, 2024 3

@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.

philtrep avatar philtrep commented on May 21, 2024 3

@imnotteixeira I'll take a look at a permanent fix tomorrow

from nodock.

philtrep avatar philtrep commented on May 21, 2024

@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:

  1. Docker/Docker-Compose versions
  2. Host OS + Version

Was there anything in the project folder before you cloned nodock?

from nodock.

zachariahtimothy avatar zachariahtimothy commented on May 21, 2024

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:

  1. Docker version 18.02.0-ce, build fc4de44 / docker-compose version 1.19.0, build 9e633ef
  2. MacOS V 10.13.3

from nodock.

philtrep avatar philtrep commented on May 21, 2024

@zachariahtimothy Any success? 😄

from nodock.

imnotteixeira avatar imnotteixeira commented on May 21, 2024

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
image

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.

MJGTwo avatar MJGTwo commented on May 21, 2024

@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.

philtrep avatar philtrep commented on May 21, 2024

@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.

Realetive avatar Realetive commented on May 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.