Code Monkey home page Code Monkey logo

Comments (8)

drwetter avatar drwetter commented on July 24, 2024

https://stackoverflow.com/questions/64211386/gitbook-cli-install-error-typeerror-cb-apply-is-not-a-function-inside-graceful

This is getting too compicated but if someone wants to give a hand here, please speak up

from docker-security.

PauloASilva avatar PauloASilva commented on July 24, 2024

I'll have a look on it.

from docker-security.

drwetter avatar drwetter commented on July 24, 2024

FYI: Just added locally below RUN npm i gitbook-cli -g

RUN cd /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/ && \
    npm install graceful-fs@latest --save

still running ...

from docker-security.

PauloASilva avatar PauloASilva commented on July 24, 2024

If you look into the Dockerfile I am running a "custom" version of GitBook: I've forked it to fix another issue.

I'll try to update GitBook dependencies in my fork. This way we avoid to maintain a hackish Dockerfile and the community will benefit from it.

from docker-security.

drwetter avatar drwetter commented on July 24, 2024
 ---> e76d1c1c2ca4
Step 4/7 : RUN cd /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/ &&     npm install graceful-fs@latest --save
 ---> Running in eac4f3c88243
npm ERR! code EISDIR
npm ERR! syscall copyfile
npm ERR! path /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/glob
npm ERR! dest /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/.glob-OKa8tj7S
npm ERR! errno -21
npm ERR! EISDIR: illegal operation on a directory, copyfile '/usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/glob' -> '/usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/.glob-OKa8tj7S'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-12-29T16_55_21_408Z-debug.log
ERROR: Service 'build' failed to build: The command '/bin/sh -c cd /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/ &&     npm install graceful-fs@latest --save' returned a non-zero code: 235
prompt> docker exec -ti e76d1c1c2ca4 /bin/sh
# # cat /root/.npm/_logs/2020-12-29T16_55_21_408Z-debug.log
cat: /root/.npm/_logs/2020-12-29T16_55_21_408Z-debug.log: No such file or directory
# cd /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/glob
# ls -la
total 80
drwxr-xr-x  3 root staff  4096 Dec 29 16:54 .
drwxr-xr-x 99 root staff  4096 Dec 29 16:54 ..
-rw-r--r--  1 root staff   765 Jul  5  2017 LICENSE
-rw-r--r--  1 root staff 14664 Jul  5  2017 README.md
-rw-r--r--  1 root staff  1430 Jul  5  2017 changelog.md
-rw-r--r--  1 root staff  6167 Jul  5  2017 common.js
-rw-r--r--  1 root staff 19433 Jul  5  2017 glob.js
drwxr-xr-x  5 root staff  4096 Dec 29 16:54 node_modules
-rw-r--r--  1 root staff  2124 Jul  6  2017 package.json
-rw-r--r--  1 root staff 12002 Jul  5  2017 sync.js
# id
uid=0(root) gid=0(root) groups=0(root)
#

from docker-security.

drwetter avatar drwetter commented on July 24, 2024

If you look into the Dockerfile I am running a "custom" version of GitBook: I've forked it to fix another issue.

I'll try to update GitBook dependencies in my fork. This way we avoid to maintain a hackish Dockerfile and the community will benefit from it.

That'll be the better approach that at least one can build again (FYI: EIS = Error, Is Directory . Probably you'll get the same error. Don't know what that is).

from docker-security.

PauloASilva avatar PauloASilva commented on July 24, 2024

Hi @drwetter,
Can you please check/test PR #34 locally before merging?

You can do it running the following commands inside your repository root directory:

$ git fetch origin pull/34/head:pr-34
$ git checkout pr-34
$ docker-compose run --rm build

Instead of using latest node docker image as base image, I've locked it (something I should have done from the beginning) to the node:12.11.1-slim.

from docker-security.

drwetter avatar drwetter commented on July 24, 2024

For such easy changes it's easier for me to use a oneliner of sed

from docker-security.

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.