bower is not recognised as an internal or external command

后端 未结 13 1254
野趣味
野趣味 2020-12-05 03:57

I have successfully installed nodejs, and express framework, however I downloaded bower via

npm install -g bower

which ran successfully.

相关标签:
13条回答
  • 2020-12-05 04:24

    C:\Users\[username]\AppData\Roaming\npm;

    should exist in PATH for both "User Variables" and "System Variables"

    0 讨论(0)
  • 2020-12-05 04:26
    1. Open cmd
    2. Check bower is installed successfully:

      bower version -v If bower version showed then go to step 3, else execute:

      npm install -g bower to install bower

    3. Close and re-open cmd (to apply new environment variables)
    4. using CD command to navigate to folder that has bower.json file then run

      bower install DONE.

    0 讨论(0)
  • 2020-12-05 04:26

    I resolved the issue my changing access rights of node.js folder. I gave Read-Write access to the file and issue resolved. node.js file path: C:\Program Files\nodejs

    0 讨论(0)
  • 2020-12-05 04:28

    Check were your cmd prompt/bash is located when you have successfully commanded "npm install"

    Look for the any of the following. -bower.cmd - windows command script -bower - file you can do a quick search in the directory.

    if you find it, copy the path to the file. "I found mine in the directory where I successfully performed npm install" + node_modules.bin" - "D:\Work\notepadplusplus\htdocs\laravel-main\angulartest\public\fed\node_modules.bin"

    Then do these

    1. Open the Windows Control Panel
    2. Go to Advance
    3. Environment Variables
    4. Click on either edit environment variables for your account, or Edit the system environment variables`.
    5. Find the variable named Path or PATH, or create one if it doesn't exist.
    6. Paste the path from your search earlier (; delimited and without any space).
    7. restart your command prompt window or your bash window.

    There is no specific path since we all have different structure of our directories. The only precise thing here is to find the bower.cmd location and that will be used to the Path to your windows environment.

    0 讨论(0)
  • 2020-12-05 04:30

    Add the directory of bower to the PATH environment variable. Avoid having any space between directories:

    C:\Program Files\nodejs;C:\Users\W\AppData\Roaming\npm\node_modules\bower\bin;C:\Users\W\AppData\Roaming\npm
    

    To me it helped to remove the user variable and write the PATH environment variable in the System variables.

    0 讨论(0)
  • 2020-12-05 04:34

    Installing Bower Windows:

    1. Install Node.js (required)
    2. npm install -g bower
    3. Add to the Path environment variable for your both Systems and Users like this:

    ;C:\Users\me\AppData\Roaming\npm\node_modules\bower\bin

    1. Restart your machine
    2. Open command prompt anywhere and type bower to verify that it works. DONE.
    0 讨论(0)
提交回复
热议问题