Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-react-app babel-loader clash #4764

Closed
mohamedmansour opened this issue Nov 10, 2018 · 60 comments
Closed

create-react-app babel-loader clash #4764

mohamedmansour opened this issue Nov 10, 2018 · 60 comments

Comments

@mohamedmansour
Copy link
Contributor

mohamedmansour commented Nov 10, 2018

Original Post Hidden As It Relates to CRAv2

When installing create-react-app 2, it already has babel-loader and @babel/core . We need to add those two as a peerDependency?

My packages.json:

{
  "version": "0.1.0",
  "private": true,
  "license": "ISC",
  "dependencies": {
    "react": "^16.6.1",
    "react-dom": "^16.6.1",
  },
  "devDependencies": {
    "@storybook/react": "^4.0.4",
    "@types/node": "^10.12.5",
    "@types/react": "^16.7.1",
    "@types/react-dom": "^16.0.9",
    "@types/storybook__react": "^4.0.0",
    "react-scripts": "^2.1.1",
    "typescript": "3.1.6"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "storybook": "start-storybook -p 9001 -c .storybook"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}

The errors warnings are:

PS D:\> yarn install
yarn install v1.12.1
info No lockfile found.
[1/4] Resolving packages...
warning react-scripts > eslint > file-entry-cache > flat-cache > circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @storybook/react@4.0.4" has unmet peer dependency "babel-loader@^7.0.0 || ^8.0.0".
warning "@storybook/react > @babel/preset-flow@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @babel/preset-react@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @babel/preset-flow > @babel/plugin-transform-flow-strip-types@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @babel/preset-react > @babel/plugin-transform-react-display-name@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @babel/preset-react > @babel/plugin-transform-react-jsx@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core@4.0.4" has unmet peer dependency "babel-loader@^7.0.0 || ^8.0.0".
warning "@storybook/react > @babel/preset-react > @babel/plugin-transform-react-jsx-self@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @babel/preset-react > @babel/plugin-transform-react-jsx-source@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @babel/preset-flow > @babel/plugin-transform-flow-strip-types > @babel/plugin-syntax-flow@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".warning "@storybook/react > @babel/preset-react > @babel/plugin-transform-react-jsx > @babel/plugin-syntax-jsx@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/plugin-proposal-class-properties@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/plugin-transform-runtime@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/plugin-transform-regenerator@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env@7.1.5" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @emotion/styled > @emotion/styled-base@0.10.6" has unmet peer dependency "@emotion/core@0.x.x".
warning "@storybook/react > @storybook/core > @babel/plugin-proposal-class-properties > @babel/plugin-syntax-class-properties@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-proposal-async-generator-functions@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-proposal-json-strings@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-syntax-object-rest-spread@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-proposal-optional-catch-binding@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-syntax-async-generators@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-arrow-functions@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-block-scoping@7.1.5" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-function-name@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-for-of@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-literals@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-modules-amd@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-modules-commonjs@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-object-super@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-new-target@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-modules-umd@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-parameters@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-shorthand-properties@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-spread@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-modules-systemjs@7.1.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-sticky-regex@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-template-literals@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-unicode-regex@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-transform-typeof-symbol@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".warning "@storybook/react > @storybook/core > @babel/preset-env > @babel/plugin-proposal-json-strings > @babel/plugin-syntax-json-strings@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".[4/4] Building fresh packages...

success Saved lockfile.
Done in 10.14s.

@igor-dv
Copy link
Member

igor-dv commented Nov 11, 2018

Yes, you need. These are direct deps for CRA, but peer for the Storybook, which means you need to install them.

@mohamedmansour
Copy link
Contributor Author

mohamedmansour commented Nov 12, 2018

This is a problem, when installing babel-loader, it requires webpack but these two dependencies are already the required dependencies of react-scripts for CRA2 which loads them.

> 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.19.1"

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:

I don't believe it is good to make users install babel-loader or @babel-core when CRA is there, it will conflict and devs will have a trouble upgrading in the future.

Is there a better way to support this? For example, once #4587 is supported, can we infer these packages like how CRA2 does it?

warning " > @storybook/react@4.0.4" has unmet peer dependency "babel-loader@^7.0.0 || ^8.0.0".
warning "@storybook/react > @storybook/core@4.0.4" has unmet peer dependency "babel-loader@^7.0.0 || ^8.0.0".

@igor-dv
Copy link
Member

igor-dv commented Nov 23, 2018

@storybook/react is supposed to match different versions of different tools.

For example:

  1. Your application may use babel 6. In that case, you will install babel-loader@7 that has a peer for babel-core (babel v6). that is why we have babel-loader as a peer dependency
  2. Another user may use babe 7. And will install babel-loader@8 with @babel/core (v7)
  3. The third user may have a usage of CRA1
  4. The fourth is using CRA2
  5. One is using TS with babel
  6. The last is using TS without babel

Unfortunately, node deps can't be transitive and we can't assume that some third party tool will bring some dep for us. Also, we can't make sure how npm/yarn will install these deps.

How can we now make everyone happy? Maybe we need to start deprecating older tooling in favor of newer... In that case, we will be able to move some of the peerDeps just to deps but it will just minimize the problem 🤷‍♂️

PS.. @storybooks/team this is something we should talk about on the next roadmap meeting.

@kylemh
Copy link
Member

kylemh commented Nov 23, 2018

Maybe a preset for CRA 1 (assumes using Babel 6, vanilla CSS, etc.) and 2 (assumes using Babel 7, no PostCSS, ready for TS, etc.)

@igor-dv
Copy link
Member

igor-dv commented Nov 23, 2018

In my vision, we need to extract presets out of the supported frameworks and make CLI install them when it recognizes one or another tool.

@tmeasday
Copy link
Member

It sounds like maybe the problem you describe can be solved by optional [react] presets that depend on these various things directly @igor-dv? Then the CLI can install the preset for you and as a user maybe you don't actually need to understand what's happening

@igor-dv
Copy link
Member

igor-dv commented Nov 25, 2018

Exactly !

@stale stale bot added the inactive label Dec 16, 2018
@storybookjs storybookjs deleted a comment from stale bot Dec 16, 2018
@stale stale bot removed the inactive label Dec 16, 2018
@ndelangen
Copy link
Member

Perhaps before you build or start storybook our CLI does a quick check on node_nodules.

We know what storybook needs...

So if we detect missing things, we add then before running. (and then run).

This way we don't have to bother users at all, and we can re-use whatever version people have though whatever means..

@ndelangen ndelangen self-assigned this Dec 16, 2018
@ndelangen ndelangen added the todo label Dec 16, 2018
@sylvhama
Copy link

sylvhama commented Jan 9, 2019

I am facing the same error as @mohamedmansour
When I do npm start with CRA v2 it says:

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.19.1"

I've removed my package-lock.json and my node_modules, the issue is still there.
When I run npm ls webpack it lists:

console-lite@4.2.0 f:\www\console-lite
+-- @storybook/react@4.1.6
| +-- @storybook/core@4.1.6
| | `-- webpack@4.28.1  deduped
| `-- webpack@4.28.1
`-- react-scripts@2.1.3
  `-- webpack@4.19.1

My depedencies:

"dependencies": {
    "intl": "^1.2.5",
    "lodash": "^4.17.11",
    "promise.prototype.finally": "^3.1.0",
    "react": "^16.6.3",
    "react-app-polyfill": "^0.2.0",
    "react-dom": "^16.6.3",
    "react-intl": "^2.7.2",
    "react-loadable": "^5.4.0",
    "react-redux": "^6.0.0",
    "react-router-dom": "^4.3.1",
    "redux": "^4.0.1",
    "redux-thunk": "^2.3.0",
    "styled-components": "^4.1.3"
  },
"devDependencies": {
    "@club/ci-tools": "^0.11.4",
    "@storybook/addon-info": "^4.1.6",
    "@storybook/addon-knobs": "^4.1.6",
    "@storybook/react": "^4.1.6",
    "cross-env": "^5.1.4",
    "ftp": "^0.3.10",
    "husky": "^1.1.2",
    "jest-image-snapshot": "^2.7.0",
    "jest-puppeteer": "^3.7.0",
    "jest-styled-components": "^6.3.1",
    "klaw-sync": "^4.0.0",
    "lint-staged": "^7.0.0",
    "mkdirp": "^0.5.1",
    "ncp": "^2.0.0",
    "prettier": "^1.15.3",
    "puppeteer": "^1.11.0",
    "react-intl-cra": "^0.3.3",
    "react-scripts": "^2.1.1",
    "react-test-renderer": "^16.6.3",
    "redux-mock-store": "^1.5.3",
    "source-map-explorer": "^1.5.0"
  },

@sylvhama
Copy link

sylvhama commented Jan 9, 2019

Weird fix:

npm uninstall @storybook/react
npm install react-scripts
npm install @storybook/react

After doing that you should not remove package-lock.json otherwise you will face the same issue again.

EDIT: Doing this has broken my tests 💀

@sstruct
Copy link

sstruct commented Jan 18, 2019

Weird fix:

npm uninstall @storybook/react
npm install react-scripts
npm install @storybook/react

After doing that you should not remove package-lock.json otherwise you will face the same issue again.

EDIT: Doing this has broken my tests 💀

Yes, then remove the babel-loader added by @storybook/react and renpm install, the tests come back for me. 🤷‍♂️

@sylvhama
Copy link

I've updated react-scripts (2.1.5) and storybook react and its addons (4.1.11). The issue is still there but it's about babel-loader now:

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

  "babel-loader": "8.0.5"

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

  f:\www\console-lite\node_modules\babel-loader (version: 8.0.4)

@tmeasday
Copy link
Member

@sylvhama now you are running into this one 😢 : #5183

Most people have managed to fix it by fixing the version of babel-loader to 8.04 in package.json.

@ndelangen
Copy link
Member

😭 There's a PR to fix the babel-loader version, and make it match cra's one. I haven't been able to check it out and verify it's good.

If someone here can help us review the PR, we may be able to get it merged faster.

@sylvhama
Copy link

@tmeasday thanks for your feedback!
Their solution is not recommended by CRA Team tho. Plus Storybook v4 promise was to be compatible with CRA2 😞

@tmeasday
Copy link
Member

Their solution is not recommended by CRA Team tho. Plus Storybook v4 promise was to be compatible with CRA2

It's hard because CRA is a moving target :/

@mrmckeb
Copy link
Member

mrmckeb commented Feb 15, 2019

I'm sorry guys, this is on me too - as I got caught up and haven't gotten back to refactoring that POC/PR.

We need a more reliable system here. Right now we have an issue that's kind of related to this, so once we get through that, I think we can talk more about a long-term solution here. facebook/create-react-app#6398

I'll talk to the CRA team on this and see what ideas we can come up with to make this a more robust experience for all.

On a side note, if you're using Yarn resolutions, you can also tell Yarn to force Storybook to match CRAs versions of dependencies.

// package.json
   ...
  "resolutions": {
    "@storybook/react/babel-loader": "8.0.5"
  }

@sylvhama
Copy link

sylvhama commented Mar 8, 2019

No more issue since v5.

@shilman shilman added this to the 5.0.x milestone Mar 8, 2019
@shilman
Copy link
Member

shilman commented Mar 8, 2019

That's great to hear. Closing this now, but feel free to re-open if the issue hasn't gone away.

@diego-toro
Copy link

I'm having this exact issue. Here is my sb info

Environment Info:

  System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v12.18.3/bin/yarn
    npm: 6.14.6 - ~/.nvm/versions/node/v12.18.3/bin/npm
  Browsers:
    Chrome: 87.0.4280.88
    Firefox: 80.0.1
    Safari: 14.0.1
  npmPackages:
    @storybook/addon-actions: ^6.1.11 => 6.1.11 
    @storybook/addon-essentials: ^6.1.11 => 6.1.11 
    @storybook/addon-links: ^6.1.11 => 6.1.11 
    @storybook/node-logger: ^6.1.11 => 6.1.11 
    @storybook/preset-create-react-app: ^3.1.5 => 3.1.5 
    @storybook/react: ^6.1.11 => 6.1.11 

and here is the versioning problem:

app
├─┬ @storybook/react@6.1.11
│ └─┬ @storybook/core@6.1.11
│   └── babel-loader@8.2.2 
└─┬ react-scripts@3.4.4
  └── babel-loader@8.1.0 

When I try to build my App got this message:

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:

  "babel-loader": "8.1.0"

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

  /Users/diegotoro/code/web-er/node_modules/babel-loader (version: 8.2.2) 

Manually installing incompatible versions is known to cause hard-to-debug issues.

If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.

To fix the dependency tree, try following the steps below in the exact order:

  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
  2. Delete node_modules in your project folder.
  3. Remove "babel-loader" from dependencies and/or devDependencies in the package.json file in your project folder.
  4. Run npm install or yarn, depending on the package manager you use.

In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:

  5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
     This may help because npm has known issues with package hoisting which may get resolved in future versions.

  6. Check if /Users/diegotoro/code/web-er/node_modules/babel-loader is outside your project directory.
     For example, you might have accidentally installed something in your home folder.

  7. Try running npm ls babel-loader in your project folder.
     This will tell you which other package (apart from the expected react-scripts) installed babel-loader.
...

The only solution that worked for me was manually install babel-loader and webpack to match react-script versions. But seems pretty weird as I see #13220 skips babel installation for CRA case. But it's fully skipped. And doesn't seems to have a flag to force that behavior.

@shilman
Copy link
Member

shilman commented Jan 13, 2021

Fixed in #13607 and released in 6.2.0-alpha.12 and 6.1.12.

@shilman shilman closed this as completed Jan 13, 2021
@AskAlice
Copy link

@shilman could you explain how that works?
I updated my package.json to use storybook ^6.1.14, deleted my package.lock.json and node_modules, then ran npm i and got

+-- @storybook/react@6.1.14
| `-- @storybook/core@6.1.14
|   `-- babel-loader@8.2.2  deduped
+-- babel-loader@8.2.2 
`-- react-scripts@4.0.1
 `-- babel-loader@8.1.0

@AskAlice
Copy link

AskAlice commented Jan 24, 2021

it turns out it needs to be in the dev dependencies not the dependencies. We had it this way because of eslint expecting a storybook plugin to exist, and the fact that we deploy storybook on production.

I moved the @storybook packages to the devDependencies, and added *.stories.jsx to the .eslintignore

@FutureKode
Copy link

I am still seeing this issue. How can I fix it? npm is my package manager. Here is my sb info:

  System:
    OS: macOS 11.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 14.15.4 - /usr/local/opt/node@14/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.10 - /usr/local/opt/node@14/bin/npm
  Browsers:
    Chrome: 87.0.4280.141
    Safari: 14.0.2
  npmPackages:
    @storybook/addon-essentials: ^6.1.15 => 6.1.15 
    @storybook/addons: ^6.1.15 => 6.1.15 
    @storybook/preset-create-react-app: ^3.1.5 => 3.1.5 
    @storybook/react: ^6.1.15 => 6.1.15 

This is the problem after updating react-scripts to 4.0.1:

├─┬ @storybook/react@6.1.15
│ └─┬ @storybook/core@6.1.15
│ └── babel-loader@8.2.2
└─┬ react-scripts@4.0.1
└── babel-loader@8.1.0

@AskAlice
Copy link

AskAlice commented Jan 24, 2021

@FutureKode is storybook in your devDependencies?
Also have you tried deleting your package.lock.json & node_modules then running npm i?

@FutureKode
Copy link

FutureKode commented Jan 24, 2021

@FutureKode is storybook in your devDependencies?
Also have you tried deleting your package.lock.json & node_modules then running npm i?

Hi @AskAlice , this is what is in my devDependencies:

    "@storybook/addon-essentials": "^6.1.15",
    "@storybook/addons": "^6.1.15",
    "@storybook/preset-create-react-app": "^3.1.6-alpha.0",
    "@storybook/react": "^6.1.15",
    ...
    "react-scripts": "4.0.1",

Yes I have tried deleting package-lock.json & node_modules then running npm i but I still see the same error when running npm run start

@edwardbrowncross
Copy link

edwardbrowncross commented Apr 15, 2021

I found this medium article helpful in understanding what it means by 'higher up the tree'. As I understand it, it is insisting (pointlessly) that its desired version of babel-loader is the first one to be installed into node_modules. However npm installs dependencies in alphabetical order, so there's really no way to actually enforce this (without yarn).

The hacky solution I found was this:

  1. Delete node_modules and package-lock.json
  2. Add the desired version to a new package lock first with npm i --package-lock-only babel-loader@8.1.0
  3. This also adds the dependency to package.json, so now delete that added line
  4. npm i to add the rest of the packages to the lock file and install everything to node_modules.
  5. Validate the tree is correct with npm test
  6. Commit the now correct package-lock.json

If you get a new error for a different dependency on step 5, you need to back to step 1. I also found that I needed to add the package webpack@4.44.2 in step 2.

@JavascriptDeNoobAPro
Copy link

The issue went away after adding "resolutions" : { "babel-loader": "8.1.0"} to my package.json, delete yarn.lock, yarn install and then it worked !

cstenglein added a commit to raspiblitz/raspiblitz-web that referenced this issue May 31, 2021
mbustosp added a commit to mbustosp/challenge-t9_emulator that referenced this issue Jun 12, 2021
mbustosp added a commit to mbustosp/challenge-t9_emulator that referenced this issue Jun 12, 2021
* Adds storybook
* Fixes issue between CRA and storybook
as seen in storybookjs/storybook#4764 (comment)
mbustosp added a commit to mbustosp/challenge-t9_emulator that referenced this issue Jun 17, 2021
* Feature/frontend scaffolding (#1)

* Adds react base app
* Adds prettier and extends eslint rules with airbnb's ones
* Fixes reported issue with create react app when running eslint
See on facebook/create-react-app#8936
* Adds lint command to run eslint in the project
* Adds missing jsx and js extensions to eslint command
* Fixes linting errors
* Adds husky, lint-staged and pre-commit and pre-push rules
* Create CHANGELOG.md

* Feature/storybook (#2)

* Adds storybook
* Fixes issue between CRA and storybook
as seen in storybookjs/storybook#4764 (comment)

* Feature/components foundation (#3)

* Adds material ui library
* Adds dark theme
* Adds theme provider to the App main component
* Integrates material ui library with storybook
* Adds prop-types
* Adds themes and theme provider
* Adds window.matchMedia mock in jest configuration

* Feature/layout (#4)

* Updates light theme colors
* Removes padding from storybook stories
* Adds MainLayout component

* Feature/keyboard component (#5)

* Adds material-ui icons
* Adds key component
* Adds eslint rule omission for story files
* Adds keyboard component

* Fix/style improvements (#6)

* Changes themes colors and fixes deprecation message from createMuiTheme
* Solves issue related with 100vh on some mobile devices
* Makes key component responsive and replaces Paper wrapper component
* Update yarn.lock
* Adds css reset to storybook stories
* Removes maxWidth from Keyboard component

* Feature/screen component (#7)

* Adds Suggestions component
* Adds Screen component
* Adds Layout with Keyboard and Screen components story

* Feature/improves screen components (#8)

* Adds word button component
* Disables import/order eslint rule
* Adds ScreenText component
* Modifies Screen component and moves it to organisms

* Feature/local t9 typing (#9)

* Adds T9 keys handler
* Adds type definition file
* Adds useWord hook to handle the state of the words written by the user
* Adds useWriter hook to manage the t9's prediction words
* Ensambles the state and some components into the App component

* Feature/t9 service layer for frontend (#10)

* Adds service layer for T9 word prediction
* Replaces useWriter's fetchSuggestion function

* Update CHANGELOG.md

* Update README.md

* Feature/backend scaffolding (#11)

* Adds express-tool generated scaffold
* Adds eslint, prettier and airbnb linting rules
* Adds lint command
* Adds cors dependency
* Adds jest and supertest
* Adds jest rules for eslint
* Adds simple route test

* Feature/global commands (#12)

* Removes husky and lint-staged from frontend
* Adds root folder commands for both applications
* Splits lint-staged commands

* Backend t9 implementation (#13)

* Adds 10k words english dictionary sorted by global word frequency
* Adds Trie data structure
* Adds t9 key mapping
* Adds t9 service
* Adds nodemon
* Adds command to run tests on both, backend and frontend

* Updates README and CHANGELOG (#14)
@JuanGidoni
Copy link

The issue went away after adding "resolutions" : { "babel-loader": "8.1.0"} to my package.json, delete yarn.lock, yarn install and then it worked !

This force the entire team to use yarn and maybe others wants to use npm. I don't think this is the best solution.

However I found this npm force resolutions and maybe it's a way to all in the team have the problem resolved.

@merceyz
Copy link
Contributor

merceyz commented Jul 26, 2021

This force the entire team to use yarn and maybe others wants to use npm. I don't think this is the best solution.

They should be forced to use either or, shouldn't mix package managers in the same project. Besides you can disable the check that CRA does.

joaobispo2077 added a commit to joaobispo2077/linkedin-clone that referenced this issue Aug 22, 2021
@dudulasry
Copy link

I'm also experiencing this problem. The following code does not work for me.

"resolutions": {
    "babel-loader": "8.1.0"
}

This is the output of npm ls babel-loader:

├─┬ design-system@0.1.0 -> 
│ ├─┬ @storybook/addon-essentials@6.3.7
│ │ ├─┬ @storybook/addon-docs@6.3.7
│ │ │ └─┬ @storybook/builder-webpack4@6.3.7
│ │ │   └── babel-loader@8.2.2 deduped
│ │ └── babel-loader@8.2.2
│ └─┬ @storybook/react@6.3.7
│   ├─┬ @storybook/core-common@6.3.7
│   │ └── babel-loader@8.2.2 deduped
│   └─┬ @storybook/core@6.3.7
│     └─┬ @storybook/core-server@6.3.7
│       └─┬ @storybook/manager-webpack4@6.3.7
│         └── babel-loader@8.2.2 deduped
└─┬ web-app@0.1.0 ->
  └─┬ react-scripts@4.0.3
    └── babel-loader@8.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests