使用expo创建React Native应用程序时,expo会安装许多我不需要的模块。有没有办法删除这些不需要的模块,例如条形码阅读器,谷歌登录和谷歌地图。 谢谢
答案 0 :(得分:6)
npm uninstall <package name>
有效。它会从您的node_modules
更多参考 https://docs.npmjs.com/uninstalling-packages-and-dependencies
答案 1 :(得分:4)
要从node_modules
目录中删除软件包,请在命令行上使用uninstall命令。包括软件包范围在内的范围。
无作用域的软件包
npm uninstall --save <package_name>
作用域软件包
npm uninstall --save <@scope/package_name>
如果需要了解更多信息,请点击此处https://docs.npmjs.com/uninstalling-packages-and-dependencies#removing-a-local-package-from-the-packagejson-dependencies
答案 2 :(得分:0)
$ npm uninstall jest
$ npm r jest
$ yarn remove jest