關於npm start 和 npm install 報錯問題

關於npm start 和 npm install 報錯問題

npm install後執行npm start遇上三個問題
1.Cannot read property 'match' of undefined
第一個問題是在很多次npm install 基礎下報錯,npm install 不報錯了,這個問題就解決了。另外,大家可以看一下這個鏈接:

https://blog.csdn.net/sinat_42338962/article/details/94388760

輸入npm cache clear --force
在這個之後npn install 沒問題了,但是npm start還是報錯 ‘match’ of undefined

rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install

這一步我沒有嘗試,每個人的情況不同大家可以嘗試一下

2.Cannot find module 'imagemin-pngquant'
這個問題沒找到解決方法。我刪除了node_modules之後重新npm install了,但是npm start 還是報錯了,我有重複npm install,然後npm start ,於是乎終於運行起來了。
3.Cannot find module 'node-sass'
這個問題就是版本問題了。這個問題要感謝這個大佬,請看鏈接:

https://blog.csdn.net/weixin_42406046/article/details/80604623

非常實用,目前就是我遇到的所有問題。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章