yandex
loader

please wait

  • Arminder Gill Mar-08-2019 07:11:53 AM ( 2 months 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)
  • Imran Malik Mar-08-2019 07:14:09 AM ( 2 months ago )

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

  • Nageshwer Reddy Mar-08-2019 07:16:42 AM ( 2 months 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 
  • Shreya Bansal Mar-08-2019 07:18:49 AM ( 2 months 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.

  • Pooja Bhardwaj Mar-08-2019 07:21:34 AM ( 2 months 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)

Please login

Similar Discussion

Recommended For You