admin管理员组文章数量:1378588
I am facing an error when trying to run my Parcel project. The error in the browser console is:
Uncaught Error: Cannot find module '@parcel/transformer-react-refresh-wrap/lib/helpers/helpers.js' at newRequire (react-weather-project.f03ac8bf.js:70:19) at newRequire (react-weather-project.f03ac8bf.js:54:18) at localRequire (react-weather-project.f03ac8bf.js:93:35) at newRequire (react-weather-project.f03ac8bf.js:80:24) at react-weather-project.f03ac8bf.js:140:5 at react-weather-project.f03ac8bf.js:159:3
Steps to reproduce:
- Installed dependencies using
npm install
- Started the project using
npm start
- Error appeared in the console
What I've tried:
Cleared Parcel cache & reinstalled dependencies
rm -rf .parcel-cache node_modules package-lock.json npm install
Reinstalled Parcel
npm uninstall parcel && npm install --save-dev parcel
Installed missing module
npm install --save-dev @parcel/transformer-react-refresh-wrap
But the error still occurs.
My environment:
- OS: Ubuntu 24.04.2 LTS
- Parcel Version: 2.14.1
- Node.js Version: 22.12.0
- npm Version: 11.2.0
package.json
:
{
"name": "react-weather-project",
"version": "1.0.0",
"description": "live weather page using react",
"keywords": [
"react",
"live-weather"
],
"homepage": ";,
"bugs": {
"url": ";
},
"repository": {
"type": "git",
"url": "git+.git"
},
"license": "ISC",
"author": "Atul Kumar",
"type": "module",
"main": "script.js",
"scripts": {
"test": "jest",
"start": "parcel index.html --port 3000",
"build": "parcel build index.html"
},
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^7.3.0"
},
"devDependencies": {
"parcel": "^2.14.1",
"process": "^0.11.10"
}
}
I am facing an error when trying to run my Parcel project. The error in the browser console is:
Uncaught Error: Cannot find module '@parcel/transformer-react-refresh-wrap/lib/helpers/helpers.js' at newRequire (react-weather-project.f03ac8bf.js:70:19) at newRequire (react-weather-project.f03ac8bf.js:54:18) at localRequire (react-weather-project.f03ac8bf.js:93:35) at newRequire (react-weather-project.f03ac8bf.js:80:24) at react-weather-project.f03ac8bf.js:140:5 at react-weather-project.f03ac8bf.js:159:3
Steps to reproduce:
- Installed dependencies using
npm install
- Started the project using
npm start
- Error appeared in the console
What I've tried:
Cleared Parcel cache & reinstalled dependencies
rm -rf .parcel-cache node_modules package-lock.json npm install
Reinstalled Parcel
npm uninstall parcel && npm install --save-dev parcel
Installed missing module
npm install --save-dev @parcel/transformer-react-refresh-wrap
But the error still occurs.
My environment:
- OS: Ubuntu 24.04.2 LTS
- Parcel Version: 2.14.1
- Node.js Version: 22.12.0
- npm Version: 11.2.0
package.json
:
{
"name": "react-weather-project",
"version": "1.0.0",
"description": "live weather page using react",
"keywords": [
"react",
"live-weather"
],
"homepage": "https://github/atul030702/react-liveWeather#readme",
"bugs": {
"url": "https://github/atul030702/react-liveWeather/issues"
},
"repository": {
"type": "git",
"url": "git+https://github/atul030702/react-liveWeather.git"
},
"license": "ISC",
"author": "Atul Kumar",
"type": "module",
"main": "script.js",
"scripts": {
"test": "jest",
"start": "parcel index.html --port 3000",
"build": "parcel build index.html"
},
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^7.3.0"
},
"devDependencies": {
"parcel": "^2.14.1",
"process": "^0.11.10"
}
}
Share
Improve this question
edited Mar 19 at 13:50
jonrsharpe
122k30 gold badges268 silver badges476 bronze badges
asked Mar 19 at 11:55
Atul SinghAtul Singh
1
1
- 2 Your post contains several indicators that ChatGPT or another LLM was used to generate it. For a variety of reasons, the use of such generative AI tools is strictly disallowed on Stack Overflow. Please edit your question to remove and replace content that was generated using these tools. – esqew Commented Mar 19 at 12:48
1 Answer
Reset to default 0Yo! to solve this error i removed "main" in package.json and if you encounter "failed to resolve react-router/dom" something like this then add this code below code in your package.json file
"@parcel/resolver-default": {
"packageExports": true
}
本文标签:
版权声明:本文标题:javascript - Parcel Error: Cannot find module '@parceltransformer-react-refresh-wraplibhelpershelpers.js' - Stac 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744459737a2607177.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论