lando / cli

The cli part of Lando
https://docs.lando.dev/cli
GNU General Public License v3.0
29 stars 34 forks source link

Unhandled rejection Error: Cannot find module './lando-cli/docs/.vuepress/guides.json' when installing from source #42

Open gilzow opened 2 years ago

gilzow commented 2 years ago

Following the directions for installing from source: https://docs.lando.dev/basics/installation.html#from-source Followed the installation directions for Hyperdrive v0.6.1 to make sure I have all the needed dependencies. I had node v16 installed so it suggested downgrading. Hyperdrive continued with the installation of node12 and the hyperdrive version of vim and completed with:

Installation complete. You have made it into hyperspace!
Please run again if you want to verify installation success.

Note: Install from source notes indicates we need the latest version of node 14 but hyperdrive installed node v12.
Continued with directions on cloning the lando cli repo and running yarn.

I then added the symlink per the instructions. Running lando.dev (or ./bin/lando.js from the repo directory) produces the following error:

Unhandled rejection Error: Cannot find module '/Users/gilzow/Documents/projects/lando-cli/docs/.vuepress/guides.json'
Require stack:
- /Users/gilzow/Documents/projects/lando-cli/plugins/lando-alliance/tasks/guide-generate.js
- /Users/gilzow/Documents/projects/lando-cli/lib/lando.js
- /Users/gilzow/Documents/projects/lando-cli/bin/lando.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at module.exports (/Users/gilzow/Documents/projects/lando-cli/plugins/lando-alliance/tasks/guide-generate.js:16:22)
    at /Users/gilzow/Documents/projects/lando-cli/lib/lando.js:89:37
From previous event:
    at processImmediate (internal/timers.js:461:21)

Inspected the lando-cli directory and there was no docs folder present. I manually created the ./docs/.vuepress directories and made an empty ( {}) guides.json file and now lando.dev runs as it should. However, I assume these directories and file should be present?

siliconmeadow commented 2 years ago

Thank you @gilzow - my installation was a little more fiddly, but your technique of adding the empty file worked for me. :-)