You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand the issue has something to do with mismatching core-js dependencies, but I can't seem to find a practical solution.
Afaik, core-js/modules/es7.object.get-own-property-descriptors exists in core-js v2 whereas 'core-js/modules/es.object.get-own-property-descriptors' exists in v3.
Stacktrace
ERR! => Failed to build the preview
ERR! Module not found: Error: Can't resolve 'core-js/modules/es7.object.get-own-property-descriptors' in '~/project/.storybook'
ERR! ModuleNotFoundError: Module not found: Error: Can't resolve 'core-js/modules/es7.object.get-own-property-descriptors' in '~/project/.storybook'
ERR! at ~/project/node_modules/webpack/lib/Compilation.js:925:10
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:401:22
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:130:21
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:224:22
ERR! at ~/project/node_modules/neo-async/async.js:2830:7
ERR! at ~/project/node_modules/neo-async/async.js:6877:13
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:214:25
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:213:14
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:28:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/ModuleKindPlugin.js:30:40
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! ModuleNotFoundError: Module not found: Error: Can't resolve 'core-js/modules/es7.object.get-own-property-descriptors' in '~/project/.storybook'
ERR! at ~/project/node_modules/webpack/lib/Compilation.js:925:10
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:401:22
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:130:21
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:224:22
ERR! at ~/project/node_modules/neo-async/async.js:2830:7
ERR! at ~/project/node_modules/neo-async/async.js:6877:13
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:214:25
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:213:14
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:28:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/ModuleKindPlugin.js:30:40
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! resolve 'core-js/modules/es7.object.get-own-property-descriptors' in '~/project/.storybook'
ERR! Parsed request is a module
ERR! using description file: ~/project/package.json (relative path: ./.storybook)
ERR! Field 'browser' doesn't contain a valid alias configuration
ERR! resolve as module
ERR! looking for modules in ~/project/.storybook/stubs
ERR! using description file: ~/project/package.json (relative path: ./.storybook/stubs)
ERR! Field 'browser' doesn't contain a valid alias configuration
...
If I manually add core-js@v2.6.12, then I get the following error Module not found: Error: Can't resolve 'core-js/modules/es.symbol.js' when building storybook.
Stacktrace
ERR! Module not found: Error: Can't resolve 'core-js/modules/es.symbol.js' in '~/project/.storybook'
ERR! ModuleNotFoundError: Module not found: Error: Can't resolve 'core-js/modules/es.symbol.js' in '~/project/.storybook'
ERR! at ~/project/node_modules/webpack/lib/Compilation.js:925:10
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:401:22
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:130:21
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:224:22
ERR! at ~/project/node_modules/neo-async/async.js:2830:7
ERR! at ~/project/node_modules/neo-async/async.js:6877:13
ERR! at ~/project/node_modules/webpack/lib/NormalModuleFactory.js:214:25
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:213:14
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:28:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/ModuleKindPlugin.js:30:40
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
ERR! at eval (eval at create (~/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
ERR! at ~/project/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:285:5
...
In v5, I was having similar issues, but I was able to get away with adding core-js@v2.6.12. However, I had two problems with that:
I found myself having to manually remove node_modules and install everything again. This became a problem for a CI pipeline in a large codebase.
having to manually add core-js as a dev dependency
These are the following versions of core-js in my project's node_modules (without adding core-js)
The text was updated successfully, but these errors were encountered:
nnnoel
changed the title
Module not found: Error: Can't resolve 'core-js/modules/es7.object.get-own-property-descriptors'
storybook@6 Module not found: Error: Can't resolve 'core-js/modules/es7.object.get-own-property-descriptors'
Feb 24, 2021
I noticed this happens too if I had two different versions of storybook in the same package. That happened when I was migrating a monorepo, one was using storybook/html@5.3.9, the other storybook/react@5.0.11, and the problem disappeared when I updated them to be both 5.3.9
Haroenv
added a commit
to algolia/instantsearch
that referenced
this issue
Jan 4, 2023
I'm encountering similar issues to the ones discussed here #11255 and other places, but none of the solutions provided or suggested in https://github.com/storybookjs/storybook/blob/master/MIGRATION.md#core-js-dependency-errors appear to be working for me.
I understand the issue has something to do with mismatching
core-js
dependencies, but I can't seem to find a practical solution.Afaik,
core-js/modules/es7.object.get-own-property-descriptors
exists in core-js v2 whereas'core-js/modules/es.object.get-own-property-descriptors'
exists in v3.Stacktrace
If I manually add
core-js@v2.6.12
, then I get the following errorModule not found: Error: Can't resolve 'core-js/modules/es.symbol.js'
when building storybook.Stacktrace
In v5, I was having similar issues, but I was able to get away with adding
core-js@v2.6.12
. However, I had two problems with that:node_modules
and install everything again. This became a problem for a CI pipeline in a large codebase.core-js
as a dev dependencyThese are the following versions of
core-js
in my project'snode_modules
(without adding core-js)I'm looking for a solution that does not involve aliasing core-js packages.
Expected behavior
No issues related to core-js or reasonable workaround.
System
The text was updated successfully, but these errors were encountered: