[Bug]: Module not found: Can't resolve 'window-or-global' in .. carbon-components-react\es\internal
See original GitHub issuePackage
carbon-components-react
Browser
No response
Package version
^7.34.0
React version
^16.8.6
Description
This happened after I updated an own dependency. Maybe was a patch applied in one of your packages in the dependency tree? Maybe one of that removed window-or-global
from the dependencies?
When I want to start my react app, it fails to compile:
Failed to compile.
./node_modules/carbon-components-react/es/internal/FloatingMenu.js
Module not found: Can't resolve 'window-or-global' in 'C:\Users\...\node_modules\carbon-components-react\e
s\internal'
Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp'
Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp'
I also tried to remove node_modules and yarn.lock, and reinstalled all packages.
Due to the chokidar errors I tried to clean the yarn cache and rebooted the pc. Problem persists.
EDIT
In yarn.lock I see several minor version updates were applied to carbon packages. Also I see that the window-or-global@^1.0.1:
block was completely removed without a replacement of its version.
CodeSandbox example
Steps to reproduce
Code of Conduct
- I agree to follow this project’s Code of Conduct
- I checked the current issues for duplicate problems
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Can't resolve module (not found) in React.js - Stack Overflow
Console says that it can't find the module in the directory, but I've checked at least 10 times for typos. Anyways, here's the...
Read more >carbon-components-react - npm
Start using carbon-components-react in your project by running `npm i carbon-components-react`. There are 126 other projects in the npm ...
Read more >Strict Mode - React
StrictMode currently helps with: Identifying components with unsafe lifecycles; Warning about legacy string ref API usage; Warning about deprecated findDOMNode ...
Read more >Guide - Carbon Design System
Starting in v11, the React components for Carbon live in the @carbon/react ... This change comes from our migration to Sass Modules in...
Read more >Module not found: Can't resolve 'X' error in React | bobbyhadz
To solve the Module not found: Can't resolve error in React, make sure to install the package from the error message if it's...
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
Thanks for the heads up @fabpico! I just ran into it myself, sorry about this. I’ve got a PR up and will cut a new patch version as soon as it’s in.
We are getting the same issue failing a build on our cf toolchain, thank you.