Error: Cannot find module '../lib/utils/unsupported.js' while using Ionic

General Tech Bugs & Fixes 2 years ago

0 5 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (5)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I always get this error message when I run "Ionic start project name":

Error message

Running command - failed![ERROR] An error occurred while running npm install (exit code 1):

    module.js:471
        throw err;
        ^

    Error: Cannot find module '../lib/utils/unsupported.js'
        at Function.Module._resolveFilename (module.js:469:15)
        at Function.Module._load (module.js:417:25)
        at Module.require (module.js:497:17)
        at require (internal/module.js:20:19)
        at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:79:3)
        at Module._compile (module.js:570:32)
        at Object.Module._extensions..js (module.js:579:10)
        at Module.load (module.js:487:32)
        at tryModuleLoad (module.js:446:12)
profilepic.png
manpreet 2 years ago

Try to remove /usr/local/lib/node_modules/npm and reinstall node again. This should work.


0 views   0 shares

profilepic.png
manpreet 2 years ago

I received a similar error and now have it working.

First make sure you have the latest version

brew update

Remove your previous instance of node:

brew uninstall node

Then reinstall the latest version:

brew install node

And then make sure it is symlinked into /usr/local if it isn't already. You would get an error to let you know to complete this step.

brew link --overwrite node 

0 views   0 shares

profilepic.png
manpreet 2 years ago

On Mac OS X (10.12.6), I resolved this issue by doing the following:

brew uninstall --force node
brew install node

I then got an error complaining that node postinstall failed, and to rerun brew postinstall node

I then got an error:

permission denied @ rb_sysopen /usr/local/lib/node_modules/npm/bin/npx

I resolved that error by:

sudo chown -R $(whoami):admin /usr/local/lib/node_modules

And now I don't get this error any more.


0 views   0 shares

profilepic.png
manpreet 2 years ago

Simply follow three steps:

  1. Clear npm cache forcefully forcefully

    npm cache clean -f

  2. Install 'n' package globally using npm:

    npm install -g n

  3. Install from any of three options:

    a. sudo n stable (get the stable version)

    b. sudo n latest (get the latest version of node)

    c. sudo n x.x.x (get the specific version of node)


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community