search

Home  >  Q&A  >  body text

javascript - npm installation dependencies are always incomplete

Pull a project from github, and after npm install, you often encounter this problem when starting npm run dev

Cannot find module '...模块名...'

Go into the corresponding module dependency package and see that they are all soft link directories, and the soft link directory is an invalid directory and does not have the corresponding resource package, that is, it is not installed.

Ask the master, how can npm install also install the contents in the soft link directory when installing dependencies?

淡淡烟草味淡淡烟草味2749 days ago664

reply all(4)I'll reply

  • 天蓬老师

    天蓬老师2017-05-16 13:40:13

    npm The network speed is too slow, and incomplete installation is common.

    It is recommended to switch to cnpm

    It’s simple:

    npm install -g cnpm --registry=https://registry.npm.taobao.org
    

    After that, just use cnpm install <module-name> to install it.
    The command is just npm->cnpm, nothing else remains the same.
    Super fast

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 13:40:13

    I have been working on a project for such a long time and have never encountered this kind of problem. You can try using cnpm i

    reply
    0
  • 某草草

    某草草2017-05-16 13:40:13

    Delete C:UsersusernameAppDataRoamingnpm重新执行
    npm install

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-16 13:40:13

    Delete the originally installed package and reinstall

    reply
    0
  • Cancelreply