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.

Storybook v5.0.5 upgrade broken

See original GitHub issue

Describe the bug Using yarn upgrade-interactive --latest I just upgraded from Storybook v5.0.3 to v5.0.5 and it broke my build. Does Storybook v5.0.5 work at all? I tried upgrading two different projects and both broke.

Console output

yarn run v1.13.0
$ start-storybook -p 9009 -s public
info @storybook/react v5.0.5
info
info => Loading static files from: /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/public .
info => Loading presets
WARN   Failed to load preset: "/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/core/dist/server/manager/manager-preset.js"
ERR! Error: Cannot find module '@emotion/core/package.json'
ERR!     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:609:15)
ERR!     at Function.resolve (internal/modules/cjs/helpers.js:28:19)
ERR!     at Object.<anonymous> (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/ui/paths.js:6:36)
ERR!     at Module._compile (internal/modules/cjs/loader.js:734:30)
ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
ERR!     at Module.load (internal/modules/cjs/loader.js:626:32)
ERR!     at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
ERR!     at Function.Module._load (internal/modules/cjs/loader.js:558:3)
ERR!     at Module.require (internal/modules/cjs/loader.js:663:17)
ERR!     at require (internal/modules/cjs/helpers.js:20:18)
ERR!     at Object.<anonymous> (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/core/dist/server/manager/manager-webpack.config.js:18:37)
ERR!     at Module._compile (internal/modules/cjs/loader.js:734:30)
ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
ERR!     at Module.load (internal/modules/cjs/loader.js:626:32)
ERR!     at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
ERR!     at Function.Module._load (internal/modules/cjs/loader.js:558:3)
ERR!  { Error: Cannot find module '@emotion/core/package.json'
ERR!     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:609:15)
ERR!     at Function.resolve (internal/modules/cjs/helpers.js:28:19)
ERR!     at Object.<anonymous> (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/ui/paths.js:6:36)
ERR!     at Module._compile (internal/modules/cjs/loader.js:734:30)
ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
ERR!     at Module.load (internal/modules/cjs/loader.js:626:32)
ERR!     at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
ERR!     at Function.Module._load (internal/modules/cjs/loader.js:558:3)
ERR!     at Module.require (internal/modules/cjs/loader.js:663:17)
ERR!     at require (internal/modules/cjs/helpers.js:20:18)
ERR!     at Object.<anonymous> (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/core/dist/server/manager/manager-webpack.config.js:18:37)
ERR!     at Module._compile (internal/modules/cjs/loader.js:734:30)
ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
ERR!     at Module.load (internal/modules/cjs/loader.js:626:32)
ERR!     at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
ERR!     at Function.Module._load (internal/modules/cjs/loader.js:558:3)
ERR!   stack:
ERR!    "Error: Cannot find module '@emotion/core/package.json'\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:609:15)\n    at Function.resolve (internal/modules/cjs/helpers.js:28:19)\n    at Object.<anonymous> (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/ui/paths.js:6:36)\n    at Module._compile (internal/modules/cjs/loader.js:734:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)\n    at Module.load (internal/modules/cjs/loader.js:626:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:558:3)\n    at Module.require (internal/modules/cjs/loader.js:663:17)\n    at require (internal/modules/cjs/helpers.js:20:18)\n    at Object.<anonymous> (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/core/dist/server/manager/manager-webpack.config.js:18:37)\n    at Module._compile (internal/modules/cjs/loader.js:734:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)\n    at Module.load (internal/modules/cjs/loader.js:626:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:558:3)",
ERR!   code: 'MODULE_NOT_FOUND' }
info => Loading presets
info => Loading custom webpack config (full-control mode).
info => Loading create-react-app config.
 10% building 4/5 modules 1 active ...oc-css-komponenter/.storybook/config.js

WARN force closed preview build

WARN FATAL broken build!, will close the process,
WARN Fix the error below and restart storybook.

EntryModuleNotFoundError: Entry module not found: Error: Can't resolve './src' in '/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter'
    at moduleFactory.create (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/core/node_modules/webpack/lib/Compilation.js:980:31)
    at factory (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/core/node_modules/webpack/lib/NormalModuleFactory.js:397:22)
    at resolver (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/core/node_modules/webpack/lib/NormalModuleFactory.js:130:21)
    at asyncLib.parallel (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/core/node_modules/webpack/lib/NormalModuleFactory.js:224:22)
    at /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/neo-async/async.js:2825:7
    at /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/neo-async/async.js:6886:13
    at normalResolver.resolve (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/@storybook/core/node_modules/webpack/lib/NormalModuleFactory.js:214:25)
    at doResolve (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/enhanced-resolve/lib/Resolver.js:184:12)
    at hook.callAsync (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
    at resolver.doResolve (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5)
    at hook.callAsync (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
    at hook.callAsync (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:12:1)
    at resolver.doResolve (/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38)
resolve './src' in '/Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter'
  using description file: /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/package.json (relative path: ./src)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/src is not a file
      .wasm
        Field 'browser' doesn't contain a valid alias configuration
        /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/src.wasm doesn't exist
      .mjs
        Field 'browser' doesn't contain a valid alias configuration
        /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/src.mjs doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/src.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/src.json doesn't exist
      as directory
        existing directory
          using path: /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/src/index
            using description file: /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/package.json (relative path: ./src/index)
              no extension
                Field 'browser' doesn't contain a valid alias configuration
                /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/src/index doesn't exist
              .wasm
                Field 'browser' doesn't contain a valid alias configuration
                /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/src/index.wasm doesn't exist
              .mjs
                Field 'browser' doesn't contain a valid alias configuration
                /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/src/index.mjs doesn't exist
              .js
                Field 'browser' doesn't contain a valid alias configuration
                /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/src/index.js doesn't exist
              .json
                Field 'browser' doesn't contain a valid alias configuration
                /Users/fl-macbook-retina/Dropbox/Projects/poc-css-komponenter/src/index.json doesn't exist
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

System:

  • OS: macOS Mojave
  • Device: Macbook Pro
  • Framework: React
  • Version: v5.0.5

git diff package.json

diff --git a/package.json b/package.json
index ead4ddb..e9f8d5f 100644
--- a/package.json
+++ b/package.json
@@ -4,11 +4,11 @@
   "private": true,
   "dependencies": {
     "@types/jest": "24.0.11",
-    "@types/node": "11.11.4",
+    "@types/node": "11.11.6",
     "@types/react": "16.8.8",
-    "@types/react-dom": "16.8.2",
-    "react": "^16.7.0",
-    "react-dom": "^16.7.0",
+    "@types/react-dom": "16.8.3",
+    "react": "^16.8.5",
+    "react-dom": "^16.8.5",
     "react-scripts": "2.1.8",
     "typescript": "3.3.4000"
   },
@@ -31,14 +31,14 @@
   ],
   "devDependencies": {
     "@babel/core": "^7.4.0",
-    "@storybook/addon-a11y": "^5.0.3",
-    "@storybook/addon-actions": "^5.0.3",
-    "@storybook/addon-info": "^5.0.3",
-    "@storybook/addon-knobs": "^5.0.3",
-    "@storybook/addon-links": "^5.0.3",
-    "@storybook/addon-storysource": "^5.0.3",
-    "@storybook/addons": "^5.0.3",
-    "@storybook/react": "^5.0.3",
+    "@storybook/addon-a11y": "^5.0.5",
+    "@storybook/addon-actions": "^5.0.5",
+    "@storybook/addon-info": "^5.0.5",
+    "@storybook/addon-knobs": "^5.0.5",
+    "@storybook/addon-links": "^5.0.5",
+    "@storybook/addon-storysource": "^5.0.5",
+    "@storybook/addons": "^5.0.5",
+    "@storybook/react": "^5.0.5",
     "babel-loader": "^8.0.5"
   }
 }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:17
  • Comments:29 (7 by maintainers)

github_iconTop GitHub Comments

48reactions
florianmartenscommented, Feb 12, 2022

Still running into this. Not very pleasant.

8reactions
monsterkrampecommented, Mar 25, 2019

Strangely it seems to work after deleting node_modules and yarn.lock and running yarn again…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Storybook v5.0.5 upgrade broken #6255 - Issuehunt
Describe the bug Using yarn upgrade-interactive --latest I just upgraded from Storybook v5.0.3 to v5.0.5 and it broke my build. Does Storybook v5.0.5...
Read more >
Upgrading Storybook
This upgrades all of the Storybook packages in your project to the latest stable version, perform confidence checks of your package versions, and...
Read more >
Release notes for Windows - Zoom Support
This article contains information about recent changes to the Zoom app for Windows, including new and enhanced features, updates to existing features, ...
Read more >
PC/Mac Patch Notes v5.0.5 (Elsweyr & Update 22)
5 – After being damaged by a damage over time ability, increase your Healing Received by 6% and your Physical and Spell Resistance...
Read more >
History | Real Racing 3 Wiki - Fandom
Ferrari, Lamborghini, Formula 1® and more race into this update: Feel the need for SPED with the Ferrari Daytona SP3! Take on a...
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