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.

Unable to recover from dependency issues

See original GitHub issue

Is this a bug report?

Yes, although it’s highly probable that I’ve done something stupid.

For the record everything was working yesterday, and today it’s not. Today I added redux, react-redux, and redux-thunk, which may have (but probably didn’t) caused this issue. I removed them, and did multiple dependency resets, but to no avail.

My main issue is that I cannot determine how to resolve the dependency issue described in the form below, which seems to be that there are two (different) versions of babel-loader being loaded.

When I add SKIP_PREFLIGHT_CHECK=true in .env, I get a different error:

Error: Cannot find module ‘fork-ts-checker-webpack-plugin’

running npm ls fork-ts-checker-webpack-plugin returns empty, and I believe this is a dependency of react-scripts.

I did a look-see in the yarn-lock and found the following entry for an alt version, and this is where I’m pretty much stuck trying to figure this out, as I don’t want to proceed to start trying to manually add dependencies willy-nilly.

fork-ts-checker-webpack-plugin-alt@0.4.14:
  version "0.4.14"
  resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin-alt/-/fork-ts-checker-webpack-plugin-alt-0.4.14.tgz#1bd6c0d97b7d4682dde61255fcbd78b72f7473a0"
  integrity sha512-s0wjOBuPdylMRBzZ4yO8LSJuzem3g0MYZFxsjRXrFDQyL5KJBVSq30+GoHM/t/r2CRU4tI6zi04sq6OXK0UYnw==
  dependencies:
    babel-code-frame "^6.22.0"
    chalk "^2.4.1"
    chokidar "^2.0.4"
    lodash "^4.17.11"
    micromatch "^3.1.10"
    minimatch "^3.0.4"
    resolve "^1.5.0"
    tapable "^1.0.0"

Did you try recovering your dependencies?

I’ve done this several times before submitting this issue.

Yarn version 1.13.0

FYI: yarn is what I usually use, and I know not to mix package managers; however, in troubleshooting this issue, I’ve also done dependency resets and tried to re-install with npm version 6.7.0

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Environment

Environment Info:

System: OS: Linux 4.4 Ubuntu 18.04.1 LTS (Bionic Beaver) CPU: x64 Intel® Core™ i7-7700 CPU @ 3.60GHz Binaries: Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node Yarn: 1.13.0 - ~/.yarn/bin/yarn npm: 6.7.0 - ~/.nvm/versions/node/v10.13.0/bin/npm npmPackages: react: ^16.7.0 => 16.8.1 react-dom: ^16.7.0 => 16.8.1 react-scripts: 2.1.3 => 2.1.3 npmGlobalPackages: create-react-app: 2.1.3

Steps to Reproduce

(Write your steps here:)

  1. delete node_modules
  2. delete yarn.lock
  3. run “yarn”
  4. run “yarn start”

I’ve actually tried the above with npm as well, like this:

  1. delete node_modules
  2. delete package.lock.json
  3. run “npm install”
  4. run “npm run start”

Expected Behavior

The app should run…

Actual Behavior

After a dependency reset using yarn, yarn start errors out with the below. Note that this does not show when pre-flight check is skipped (in .env), and it goes straight to the fork-ts-checker-webpack-plugin error as shown in the npm error (shown after this):

The react-scripts package provided by Create React App requires a dependency: “babel-loader”: “8.0.4”

The command exits with the following:

error Command failed with exit code 1.

When I enter npm ls babel-loader, I get: └─┬ react-scripts@2.1.3 ├── babel-loader@8.0.4 └─┬ babel-preset-react-app@7.0.1 └── babel-loader@8.0.5

After a dependency reset with npm, npm run start errors out with the below:

Error: Cannot find module ‘fork-ts-checker-webpack-plugin’

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ianschmitzcommented, Feb 11, 2019

2.1.5 was released which reverted the change to react-dev-utils that was importing fork-ts-checker-webpack-plugin.

Can you remove your work arounds and delete your node_modules and any lock files and try react-scripts@2.1.5? I tried creating a fresh app and yarn start worked as expected.

1reaction
6footGeekcommented, Feb 11, 2019

Alas, this is the world of the javascript friend! There isn’t a lot you can do other than specify the specific versions you need and keep them untouched, your installs will work fine then as long as you keep your package-lock around 😃 Have a look at your package.json - does it have the ‘^’ character before any of the packages? that will try and pull in anything above that version.

For more reading of some of the consequences of changes in packages, you can read

https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/

I recommend popcorn, its quite the story haha

Read more comments on GitHub >

github_iconTop Results From Across the Web

Treatment and Recovery - National Institute on Drug Abuse
Research on the science of addiction and the treatment of substance use disorders ... Does relapse to drug use mean treatment has failed?...
Read more >
7 tips for supporting someone recovering from addiction
Alcohol or other substance dependency can keep someone from living the life they want. Here are 7 tips to help you support someone...
Read more >
Coping With Failure in Addiction Recovery
Everyone experiences failure from time to time, and the feeling it leaves with you can be challenging to overcome.
Read more >
The 'burden of disease' in those who recover from addiction
Recent research shows that more than one-third of people who are recovering from addiction continue to experience chronic physical disease.
Read more >
Overcoming Drug Addiction - HelpGuide.org
Step-by-step guide to drug addiction recovery, with tips for coping with cravings and dealing with relapse.
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