Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failure of plugin include-csv #1

Open
PeterBowman opened this issue Nov 20, 2021 · 3 comments
Open

Installation failure of plugin include-csv #1

PeterBowman opened this issue Nov 20, 2021 · 3 comments

Comments

@PeterBowman
Copy link
Member

PeterBowman commented Nov 20, 2021

Last night docker&gitbook CI builds of teo-developer-manual failed with:

info: installing 6 plugins using npm@3.9.2 
info:  
info: installing plugin "include-csv" 
info: install plugin "include-csv" (*) from NPM with version 1.0.1 
/root/.gitbook/versions/3.2.3/node_modules/npm/node_modules/aproba/index.js:25
    if (args[ii] == null) throw missingRequiredArg(ii)
                          ^

Error: Missing required argument #1
    at andLogAndFinish (/root/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:31:3)
    at fetchPackageMetadata (/root/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:51:22)
    at resolveWithNewModule (/root/.gitbook/versions/3.2.3/node_modules/npm/lib/install/deps.js:490:12)
    at /root/.gitbook/versions/3.2.3/node_modules/npm/lib/install/deps.js:491:7
    at /root/.gitbook/versions/3.2.3/node_modules/npm/node_modules/iferr/index.js:13:50
    at /root/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:37:12
    at addRequestedAndFinish (/root/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:67:5)
    at returnAndAddMetadata (/root/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:121:7)
    at pickVersionFromRegistryDocument (/root/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:138:20)
    at /root/.gitbook/versions/3.2.3/node_modules/npm/node_modules/iferr/index.js:13:50
Error: Process completed with exit code 1.

Eveything was fine just one week earlier. Another gitbook-enabled repo succeeded at the same time, but that one does not pull&install include-csv (see book.json). Pre-installing plugins is probably not the way to go, see roboticslab-uc3m/teo-developer-manual#69 (comment).

I tried to pull node:current-alpine at node v17.1.0, npm 8.1.4 (previously using node v10.24, npm 6.14.12). The image does not even build correctly, it fails at:

Installing GitBook 3.2.3
/usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js:287
      if (cb) cb.apply(this, arguments)
                 ^

TypeError: cb.apply is not a function
    at /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqCallback.oncomplete (fs.js:169:5)

A similar issue regarding the missing required argument was reported in this SO question, no solutions provided. See also this one concerning the cb.apply thing. See also npm/cli#681.

@PeterBowman
Copy link
Member Author

PeterBowman commented Nov 20, 2021

Idea: I noticed some direct and transitive dependencies of include-csv got upgraded in the past week. Logs of latest successful build:

info: install plugin "include-csv" (*) from NPM with version 1.0.1 
/gitbook
`-- gitbook-plugin-include-csv@1.0.1 
  +-- csv-parse@4.16.3 
  +-- iconv-lite@0.6.3 
  | `-- safer-buffer@2.1.2 
  +-- path@0.12.7 
  | +-- process@0.11.10 
  | `-- util@0.10.4 
  |   `-- inherits@2.0.3 
  `-- url@0.11.0 
    +-- punycode@1.3.2 
    `-- querystring@0.2.0 

info: >> plugin "include-csv" installed with success 

E.g. csv-parse is now at v5.0.3.

@jgvictores
Copy link
Member

In the light of #1 (comment) and failed experiments, forking and forcing specific versions through package.json seems like the way to go (btw, I do not remember what the scripts plugin was for, so no idea if it could do anything related).

Issue paused on my side for now, not really urgent.

@PeterBowman
Copy link
Member Author

PeterBowman commented Nov 14, 2023

We are now migrating to MkDocs, see roboticslab-uc3m/questions-and-answers#99. This Docker image can still be useful as long as the include-csv plugin is not requested in book.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants