question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Module not found: Can't resolve 'window-or-global' in .. carbon-components-react\es\internal

See original GitHub issue

Package

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tay1orjonescommented, Mar 11, 2022

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.

1reaction
sbohner14335commented, Mar 11, 2022

We are getting the same issue failing a build on our cf toolchain, thank you.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found