`yarn build:client` or `yarn dev` command are failure caused by `Module not found: Error:`
See original GitHub issueSummary
Module not found: Error
occurs when exec yarn build:client
or yarn dev
.
$ yarn build:client
Module not found: Error: Can't resolve 'C:/Users/username/mdn/yari/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray' in 'C:\Users\username\mdn\yari\node_modules\dexie\dist\modern'
Did you mean 'toConsumableArray.js'?
BREAKING CHANGE: The request 'C:/Users/username/mdn/yari/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
Not sure but I assume this error caused by webpack 5 or react-scripts 5.x
URL
N/A
Reproduction steps
git checkout 8f248fb0eae46f0d49c4bb1423dd668a1388408b
- delete
node_modules
yarn install
yarn build:client
oryarn dev
Expected behavior
Success a build without error
Actual behavior
Module not found: Error
occurs
Device
Desktop
Browser
Other (specify below)
Browser version
Other version (specify below)
Operating system
Windows 11
Screenshot
N/A
Anything else?
Node version is v16.15.0
Validations
- I have read the Community Participation Guidelines.
- I have verified that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- I have checked that this is a concrete bug. For Q&A open a GitHub Discussion.
Issue Analytics
- State:
- Created a year ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Error Codes | Yarn - Package Manager
A list of Yarn's error codes with detailed explanations. ... A package build failed. ... This error is usually caused by a Yarn...
Read more >Build node.js app using yarn but getting error Command "build ...
If you execute yarn run it will show the list of commands which can be run. Ideally yarn run dev will do the...
Read more >Dsapce 7 error on yarn start - Google Groups
Dear All,. I am struggling while I am install Dspace 7. When I tried to install front-end faced following error. ... error Command...
Read more >'bash: yarn: command not found' error - Netlify Support Forums
2:44:59 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'yarn build' versus '' in ...
Read more >Getting error messages when running yarn commands
It does not seem to matter what yarn command I give, ... Error: Cannot find module '/Users/isaactait/Desktop/Web_Dev/portfolio-site-2.0/ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad to hear @yoshinorin! 🎉
I think I found a (temporary) solution by recreating the
yarn.lock
file(s). However, the same error appears after switching to npm (#6322), which suggests that we’re just lucky thatyarn
accidentally fixes this somehow. 🤔https://github.com/mdn/yari/runs/6520871772?check_suite_focus=true#step:9:32