javascript - npm installation dependencies are always incomplete
淡淡烟草味
淡淡烟草味 2017-05-16 13:38:13
0
4
671

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?

淡淡烟草味
淡淡烟草味

reply all(4)
Peter_Zhu

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

phpcn_u1582

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

某草草

Delete C:UsersusernameAppDataRoamingnpm重新执行
npm install

大家讲道理

Delete the originally installed package and reinstall

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template