简体   繁体   English

每当我在反应中运行“npm start”时我得到错误:找不到模块'autoprefixer'

[英]WheneverIi run "npm start "in react i get Error: Cannot find module 'autoprefixer'

Failed to compile./src/index.css (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-4-1.?/node_modules/postcss-loader/src?.postcss.:/src/index.css) Error: Cannot find module 'autoprefixer'编译失败。/src/index.css (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-4-1.? :/src/index.css) 错误:找不到模块'autoprefixer'

cd node_modeuls/postcss-loader // you need check the correct library name from the error
npm i autoprefixe
cd ../../
npm start

Try to use this method:尝试使用此方法:

  • Delete the node_modules folder删除node_modules文件夹

  • use the yarn command.使用yarn命令。 Or if you don't have Yarn installed, try to install it first with npm install yarn and run the command yarn to install the package you need.或者如果您没有安装 Yarn,请尝试先使用npm install yarn安装它,然后运行命令yarn安装您需要的 package。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React - 错误:尝试运行 npm 启动时找不到模块反应 - React - Error: Cannot find module react when trying to run npm start 节点:内部/模块/cjs/loader:936 抛出错误; ^ 错误:找不到模块“侧通道”。 当我运行“npm start”时 - node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module 'side-channel'. When I run "npm start" React 项目中的 Tailwind - 安装过程中出现“找不到模块 'autoprefixer'”错误 - Tailwind in React project - getting "Cannot find module 'autoprefixer'" error during setup 错误:在 React Native 中运行“npm start”时找不到模块“xdl” - Error: Cannot find module 'xdl' when running "npm start" in React Native docker 出错(找不到我导出的模块),运行 npm 启动时没有问题 - Error in docker (cannot find module I exported) , not a problem when running npm start 当我运行npm run start时出现此错误 - When I run npm run start I get this error react-scripts 启动错误(找不到模块'../scripts/start') - 我该如何解决这个问题? - react-scripts start error (Cannot find module '../scripts/start') - how can i fix this? Npm start 找不到模块 './utils/verifyPackageTree' - Npm start cannot find module './utils/verifyPackageTree' npm i 错误“错误:找不到模块‘nopt’” - npm i error "Error: cannot find module 'nopt'" 为什么我会收到此 npm 错误:无法从“/home/directory”中找到模块“/home/directory” - Why do i get this npm Error: Cannot find module '/home/directory' from '/home/directory'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM