Results 1 to 3 of 3

Thread: Can't find the npm installation folder, need it to configure Webstorm

  1. #1

    Default Can't find the npm installation folder, need it to configure Webstorm

    I have WebStorm 2017.3.5 (latest).

    When I tried to start webpack-devserver via npm tool window, i got this:



    "Please specify npm or yarn package".

    The interesting part is that when i run the same script via
    Code:
    npm run start
    It works like a charm; but Webstorm refuses to do the same.
    Okay, i started googling and found out that i need to specify npm root folder. The folder is
    Code:
    artyom@linux-09ga:/usr/bin> which npm  
    /usr/bin/npm
    
    So i tried "/usr/bin/npm", "/usr/bin", "/usr/bin/npm6", "/usr" with no success, i keep getting "cannot find bin/npm-cli.js".


    Seems that i need to find the path to that file. Alright, i googled more and found the following command:
    Code:
    artyom@linux-09ga:/usr/bin> npm root -g   
    /usr/local/lib/node_modules
    
    And i tried again with that directory, but then i got "no such directory" message. I checked manually, and yes, /usr/local/lib is empty.

    So basically my task now is to find the npm-cli.js file somehow. Does someone know where npm is installed to on SUSE?

  2. #2

    Default Re: Can't find the npm installation folder, need it to configure Webstorm

    Accidentally ran into the right path by checking every folder in root.

    The path is
    Code:
    /usr/lib64/node_modules/npm6
    People on the internet often find it in simular paths, like /usr/lib/something.
    If you run into same problem, try to find node_modules directory in /usr/lib or usr/lib64, or their subfolders. According to people on the internet, paths could be... unusual, i'd say. Posting just in case someone comes from google.

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,114

    Default Re: Can't find the npm installation folder, need it to configure Webstorm

    Wouldn't a simple
    Code:
    find / -name npm-cli.js
    have showed you where it is?
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •