Works fine of 4.2.2
```ModuleNotFoundError: Module not found: Error: Can't resolve 'dom-helpers/removeClass' in '/home/jenkins/workspace/Clowncar/clowncar/node_modules/react-transition-group/esm'
at factory.create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/webpack/lib/Compilation.js:888:10)
at factory (/home/jenkins/workspace/Clowncar/clowncar/node_modules/webpack/lib/NormalModuleFactory.js:401:22)
at resolver (/home/jenkins/workspace/Clowncar/clowncar/node_modules/webpack/lib/NormalModuleFactory.js:130:21)
at asyncLib.parallel (/home/jenkins/workspace/Clowncar/clowncar/node_modules/webpack/lib/NormalModuleFactory.js:224:22)
at /home/jenkins/workspace/Clowncar/clowncar/node_modules/neo-async/async.js:2830:7
at /home/jenkins/workspace/Clowncar/clowncar/node_modules/neo-async/async.js:6877:13
at normalResolver.resolve (/home/jenkins/workspace/Clowncar/clowncar/node_modules/webpack/lib/NormalModuleFactory.js:214:25)
at doResolve (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:184:12)
at hook.callAsync (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/tapable/lib/HookCodeFactory.js:33:10),
at resolver.doResolve (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5)
at hook.callAsync (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/tapable/lib/HookCodeFactory.js:33:10),
at hook.callAsync (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/tapable/lib/HookCodeFactory.js:33:10),
at resolver.doResolve (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38)
at hook.callAsync (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn42 (eval at create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/tapable/lib/HookCodeFactory.js:33:10),
at resolver.doResolve (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/ModuleKindPlugin.js:23:37)
at hook.callAsync (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/tapable/lib/HookCodeFactory.js:33:10),
at hook.callAsync (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn2 (eval at create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/tapable/lib/HookCodeFactory.js:33:10),
at hook.callAsync (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/tapable/lib/HookCodeFactory.js:33:10),
at resolver.doResolve (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5)
at hook.callAsync (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/tapable/lib/HookCodeFactory.js:33:10),
at hook.callAsync (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/tapable/lib/HookCodeFactory.js:33:10),
at resolver.doResolve (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38)
at hook.callAsync (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn43 (eval at create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/tapable/lib/HookCodeFactory.js:33:10),
at hook.callAsync (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/home/jenkins/workspace/Clowncar/clowncar/node_modules/tapable/lib/HookCodeFactory.js:33:10),
at resolver.doResolve (/home/jenkins/workspace/Clowncar/clowncar/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38)
resolve 'dom-helpers/removeClass' in '/home/jenkins/workspace/Clowncar/clowncar/node_modules/react-transition-group/esm'
Parsed request is a module
using description file: /home/jenkins/workspace/Clowncar/clowncar/node_modules/react-transition-group/package.json (relative path: ./esm)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
looking for modules in /home/jenkins/workspace/Clowncar/clowncar/node_modules
using description file: /home/jenkins/workspace/Clowncar/clowncar/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/jenkins/workspace/Clowncar/clowncar/node_modules/dom-helpers/package.json (relative path: ./removeClass)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/node_modules/dom-helpers/removeClass doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/node_modules/dom-helpers/removeClass.json doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/node_modules/dom-helpers/removeClass.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/node_modules/dom-helpers/removeClass.jsx doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/node_modules/dom-helpers/removeClass.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/node_modules/dom-helpers/removeClass.tsx doesn't exist
as directory
/home/jenkins/workspace/Clowncar/clowncar/node_modules/dom-helpers/removeClass doesn't exist
looking for modules in /home/jenkins/workspace/Clowncar/dashboard/src/js
using description file: /home/jenkins/workspace/Clowncar/dashboard/package.json (relative path: ./src/js)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/jenkins/workspace/Clowncar/dashboard/package.json (relative path: ./src/js/dom-helpers/removeClass)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/dashboard/src/js/dom-helpers/removeClass doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/dashboard/src/js/dom-helpers/removeClass.json doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/dashboard/src/js/dom-helpers/removeClass.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/dashboard/src/js/dom-helpers/removeClass.jsx doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/dashboard/src/js/dom-helpers/removeClass.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/dashboard/src/js/dom-helpers/removeClass.tsx doesn't exist
as directory
/home/jenkins/workspace/Clowncar/dashboard/src/js/dom-helpers/removeClass doesn't exist
looking for modules in /home/jenkins/workspace/Clowncar/clowncar/src/js
using description file: /home/jenkins/workspace/Clowncar/clowncar/package.json (relative path: ./src/js)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/jenkins/workspace/Clowncar/clowncar/package.json (relative path: ./src/js/dom-helpers/removeClass)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/src/js/dom-helpers/removeClass doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/src/js/dom-helpers/removeClass.json doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/src/js/dom-helpers/removeClass.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/src/js/dom-helpers/removeClass.jsx doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/src/js/dom-helpers/removeClass.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
/home/jenkins/workspace/Clowncar/clowncar/src/js/dom-helpers/removeClass.tsx doesn't exist
as directory
/home/jenkins/workspace/Clowncar/clowncar/src/js/dom-helpers/removeClass doesn't exist
```
Same here:
...
ERROR in /node_modules/react-transition-group/esm/CSSTransition.js
Module not found: Error: Can't resolve 'dom-helpers/removeClass' in '/node_modules/react-transition-group/esm'
@ /node_modules/react-transition-group/esm/CSSTransition.js 6:0-53 19:11-25
@ /node_modules/react-transition-group/esm/index.js
@ /node_modules/react-smooth/es6/AnimateGroup.js
@ /node_modules/react-smooth/es6/index.js
@ /node_modules/recharts/lib/component/Tooltip.js
...
I'm seeing the same as @lucsky for dom-helpers. I'm going to pin a known working version for now
I ran into the same problem. Took me awhile to track it down to this library. My project has a lot of other dependencies that depend on dom-helpers 3, so this broke everything. I pinned to 4.2.2 for now and that fixed the issue.
ya'll if you are running into issues your lock file is likely wrong, or you are too aggressively trying to flatten dependencies.
Most of the errors here look like build steps insisting on an incompatible dedupe of dom-helpers, or not actually installing the correct thing as is specified by this package
Thanks for the tip. Turns out my webpack config was causing issues. I had the following as my resolve config:
resolve: {
modules: [path.join(__dirname, 'src', 'js'), path.join(__dirname, 'node_modules')],
...
},
Changing it to the following fixed the problem by allowing webpack to use relative paths for resolution instead of absolute paths:
resolve: {
modules: [path.join(__dirname, 'src', 'js'), 'node_modules'],
...
},
Most helpful comment
Thanks for the tip. Turns out my webpack config was causing issues. I had the following as my resolve config:
Changing it to the following fixed the problem by allowing webpack to use relative paths for resolution instead of absolute paths: