rapi-doc / RapiDoc

RapiDoc -WebComponent for OpenAPI Spec
https://rapidocweb.com
MIT License
1.71k stars 285 forks source link

Errors upon installation attempt - how to install ?? #167

Closed CDahmsCellarEye closed 4 years ago

CDahmsCellarEye commented 4 years ago

I'm trying to get this repo to install and run. I'm using Ubuntu 18.04 with the latest updates if that matters. Based on the readme here is what I have tried so far:

cd ~
git clone https://github.com/mrin9/RapiDoc.git
cd RapiDoc
yarn install

Which results in:

Command 'yarn' not found

So I did:

sudo apt-get install yarn

The yarn install seemed successful, so I did:

yarn install

Which results in:

00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'

Based on this post:

https://github.com/mrin9/RapiDoc/issues/8

I then tried:

npm install

Which results in:

$ npm install
loadDep:swagger2openapi → ▄ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! Linux 5.0.0-37-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/cdahms/RapiDoc/npm-debug.log

The full debug log is attached per the error message instructions.

Suggestions ??

This question is similar to one I posted on RapiPdf @ https://github.com/mrin9/RapiPdf/issues/44

--- Edit ---

Based on https://stackoverflow.com/questions/46013544/yarn-install-command-error-no-such-file-or-directory-install

I tried:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update  
sudo apt-get install yarn

Then:

cd ~/RapiDoc
yarn install

Which results in:

$ yarn install
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
error marked@0.8.2: The engine "node" is incompatible with this module. Expected version ">= 8.16.2". Got "8.10.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I'm not able to make sense of this error message.

I should mention if I do:

cd ~/RapiDoc
npm install

I still get:

$ npm install
loadDep:swagger2openapi → ▀ ╢██████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! Linux 5.0.0-37-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/cdahms/RapiDoc/npm-debug.log

Full error log attached per error message instructions. Suggestions ??

npm-debug.log

LevinGuy commented 4 years ago

Hi @CDahmsCellarEye,

First try to run:

npm install -g yarn

This will install yarn globally

Then: yarn install

Thanks, Guy

CDahmsCellarEye commented 4 years ago

@LevinGuy,

Thanks for the suggestion. If I do:

cd ~/RapiDoc
sudo npm install -g yarn
sudo npm install

I get:

$ sudo npm install
loadDep:swagger2openapi → ▀ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! Linux 5.0.0-37-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/cdahms/RapiDoc/npm-debug.log

Full log attached.

If I do:

cd ~/RapiDoc
sudo npm install -g yarn
sudo yarn install

I get:

$ sudo yarn install
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
error marked@0.8.2: The engine "node" is incompatible with this module. Expected version ">= 8.16.2". Got "8.10.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I'm using Ubuntu 18.04 with the latest updates. Suggestions ??

npm-debug.log

LevinGuy commented 4 years ago

Hi @CDahmsCellarEye,

The second option looks ok, but according to the message you need an updated node version.

Expected version ">= 8.16.2". Got "8.10.0

You can try the following:

$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
...

$ sudo apt-get install -y nodejs
...

$ node -v
v12.13.0

In order to update your node.

Then run the yarn install again.

Thanks, Guy