LearnCard icon indicating copy to clipboard operation
LearnCard copied to clipboard

Missing module installing @learncard/cli

Open deboboy opened this issue 2 years ago • 1 comments

Getting this error trying to install via npx @learncard/cli

Cannot find module 'fs/promises'

deboboy avatar Apr 21 '24 22:04 deboboy

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!

Custard7 avatar Apr 23 '24 18:04 Custard7

Closing this out since there hasn't been further comment

Custard7 avatar Sep 05 '24 21:09 Custard7