Code Monkey home page Code Monkey logo

storybook-issue-6161's Introduction

storybook-issue-6161

Reproduction of Storybook issue 6161, where installation of storybook v5 alongside create-react-app produces an error about incompatible webpack versions.

> react-scripts start


There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

  "webpack": "4.28.3"

Don't try to install it manually: your package manager does it automatically.
However, a different version of webpack was detected higher up in the tree:

  /Users/trevoreyre/storybook-issue-6161/node_modules/webpack (version: 4.29.6)

Steps to reproduce

  1. Create new app using create-react-app
create-react-app test-app
  1. Install latest storybook (currently 5.0.5) using cli
cd test-app
npx -p @storybook/cli sb init
  1. Move react-scripts in package.json to end of devDependencies list.
{
  ...
  "dependencies": {
    "react": "^16.8.5",
    "react-dom": "^16.8.5"
  },
  "devDependencies": {
    "@storybook/react": "^5.0.5",
    "@storybook/addon-actions": "^5.0.5",
    "@storybook/addon-links": "^5.0.5",
    "@storybook/addons": "^5.0.5",
    "@babel/core": "^7.4.0",
    "babel-loader": "^8.0.5",
    "react-scripts": "2.1.8"
  }
  ...
}
  1. Delete node_modules and package-lock.json, then run fresh npm install

  2. Try running app with npm start

storybook-issue-6161's People

Contributors

trevoreyre avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.