Storybook: ERROR: in ./node_modules/core-js/internals/array-for-each.js Module not found: Error: Can't resolve '../internals/array-methods'

Created on 17 Jun 2019  路  8Comments  路  Source: storybookjs/storybook

Problem with core-js package.

After running component explorer command yarn run storybook i end up with this issue.
storybook1

Requiring module that doesn't exists;
storybook2

System:

  • OS: Windows 10
  • Node - 10.15.1
  • Npm - 6.4.1
dependencies inactive question / support

Most helpful comment

Not sure if it's gonna help, but I resolved this issue by removing the node_modules folder and running Yarn install again.

All 8 comments

what the? how can that happen?

so array-for-each was found, but array-methods is not?
These paths are there for core-js v3, What version have you installed?

I started with this tutorial https://www.learnstorybook.com/react/en/get-started/ and end up with issue i described above. There is no such problem in the latest version of core-js.

I got the same issue when I try to start with the tutorial https://www.learnstorybook.com/react/en/get-started/. And the core-js version is 3.1.4 in it.

Note that in core-js 3.1.4, there's no such file ../internals/array-methods exist indeed.

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

When I'm installing core-js v3.1.4, within the file: node_modules/core-js/internals/array-for-each.js I get:

'use strict';
var $forEach = require('../internals/array-iteration').forEach;
var sloppyArrayMethod = require('../internals/sloppy-array-method');

// `Array.prototype.forEach` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
module.exports = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {
  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
} : [].forEach;

no references to ../internals/array-methods..

Does anyone have a reproduction repo I can checkout?

Not sure if it's gonna help, but I resolved this issue by removing the node_modules folder and running Yarn install again.

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rpersaud picture rpersaud  路  3Comments

tirli picture tirli  路  3Comments

alexanbj picture alexanbj  路  3Comments

tlrobinson picture tlrobinson  路  3Comments

dnlsandiego picture dnlsandiego  路  3Comments