Summarize the handling of metaphysical (version) problems in npm install and yarn install

Foreword: In the development process related to vue, npm install and yarn install often fail, but you can't solve the problem according to his error prompt.

Next, several corresponding methods are introduced for reference.

1.
(1)rm -rf node_modules
(2)npm install --cache /tmp/empty-cache
2.
(1)rm -rf node_modules
(2)npm cache clear --force && npm install --no-shrinkwrap --update-binary
3.
(1)rm -rf node_modules
(2)rm package-lock.json
(3)npm install

Guess you like

Origin blog.csdn.net/qq_27295403/article/details/120907758