简体   繁体   English

如何解决 /src/index.js 未找到模块:无法解析 'C:\Users\hp\weather\src' 中的 './serviceWorker'

[英]how to resolve /src/index.js Module not found: Can't resolve './serviceWorker' in 'C:\Users\hp\weather\src'

I was building a weather app in react and I got the following error我正在构建一个天气应用程序,我收到以下错误

/src/index.js Module not found: Can't resolve './serviceWorker' in 'C:\Users\hp\weather\src' /src/index.js 模块未找到:无法解析 'C:\Users\hp\weather\src' 中的 './serviceWorker'

what to do now?现在要做什么?

Looks like you have deleted the serviceWorker.js file from the src/ folder.看起来您已经从src/文件夹中删除了serviceWorker.js文件。

If it is not required, remove the import statement from the index.js file as well.如果不需要,也请从 index.js 文件中删除import语句。

暂无
暂无

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

相关问题 'react' - 运行 npm start 后,它给出 ./src/index.js Module not found: Can't resolve 'react' in 'C:\\Users\\...\\src' 错误 - 'react' - After run npm start it gives ./src/index.js Module not found: Can't resolve 'react' in 'C:\Users\...\src' error 如何修复“./src/index.js Module not found: Can't resolve 'loadash” in my react app? - How to fix "./src/index.js Module not found: Can't resolve 'loadash" in my react app? ./src/components/index.js找不到模块:无法解析“ / src / components”中的“ ./{Component}” - ./src/components/index.js Module not found: Can't resolve './{Component}' in '/src/components' 找不到入口模块:错误:无法解析'./src/index.js' - Entry module not found: Error: Can't resolve './src/index.js' 未能编译./src/index.js找不到模块:无法在 - Failed to compile ./src/index.js Module not found: Can't resolve 'react' in ./src/index.js 找不到模块:无法解析'~antd/dist/antd.css' - ./src/index.js Module not found: Can't resolve '~antd/dist/antd.css' ./src/index.js 未找到模块:无法解析“aws-amplify”React - ./src/index.js Module not found: Can't resolve 'aws-amplify' React ./src/Firebase.js 模块未找到:无法解析“C:\\Users\\HP\\Desktop\\React\\clone\\disney-plus-clone\\src”中的“firebase” - ./src/Firebase.js Module not found: Can't resolve 'firebase' in 'C:\Users\HP\Desktop\React\clones\disney-plus-clone\src' 找不到模块:无法解析 ../MyApp\src 中的 './serviceWorker' - Module not found: Can't resolve './serviceWorker' in ../MyApp\src' 未找到模块:无法解析“C:\Users\Mohammad\Desktop\Chat-System\src\components”中的“..src/firebase.js” - Module not found: Can't resolve '..src/firebase.js' in 'C:\Users\Mohammad\Desktop\Chat-System\src\components'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM