Missing module installing @learncard/cli
Getting this error trying to install via npx @learncard/cli
Cannot find module 'fs/promises'
Hey @deboboy!
That error usually is an issue with node version. fs/promises is an API for the fs (file system) module which provides asynchronous file system methods - stabilized in node 14.
Try this:
1. Check node version
Esnure you have at least version 14.0.0. You can check with:
node -v
If the version number is below 14.0.0, you will need to update.
2. Update node
Using Node Version Manager (nvm)
If you have nvm installed (a popular version manager for node):
nvm install 14 # This installs the latest node 14.x.x
nvm use 14 # This switches to version 14.x.x
Or you can install the latest stable version:
nvm install --lts
nvm use --lts
Using Official Package
Otherwise, use the official Node.js website.
3. Verify Installation
After updating node, you can verify your version:
node -v # Check the Node.js version again
4. Try Installation Again
Once your node >= 14, try installing the cli again:
npx @learncard/cli
Let me know if that solves your problem!
Closing this out since there hasn't been further comment