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.

Impossible to run `preview` because of linting errors

See original GitHub issue
  • Platform: Darwin quack.local 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64
  • Mercury Parser Version: 2.1.1

Expected Behavior

I had just finished my first custom extractor and wanted to run ./preview [url of page] to make sure it works fine and extract the correct stuff, but it never got there because of the issue explained below.

Current Behavior

It seems from the output that Mercury needs to be rebuilt because the console output shows this:

$ ./preview https://www.la-croix.com/Famille/Education/enseignants-francais-sentent-pas-assez-formes-2019-06-19-1201029921
Rebuilding Mercury
error Command failed with exit code 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @postlight/mercury-parser@2.1.1 build: `yarn lint && rollup -c && yarn test:build`
npm ERR! Exit status 1

... more output skipped ...

Looking further into the problem, it appears that it runs first eslint . --fix (via yarn lint). Running this on the command line, I get these errors in the output:

$ eslint . --fix

/Users/jakob/Projects/mercury-parser/src/cleaners/index.js
  6:1  error  Dependency cycle detected  import/no-cycle

/Users/jakob/Projects/mercury-parser/src/cleaners/title.js
  5:1  error  Dependency cycle detected  import/no-cycle

/Users/jakob/Projects/mercury-parser/src/extractors/generic/content/scoring/index.js
   6:1  error  Dependency cycle detected  import/no-cycle
   8:1  error  Dependency cycle detected  import/no-cycle
   9:1  error  Dependency cycle detected  import/no-cycle
  10:1  error  Dependency cycle detected  import/no-cycle
  11:1  error  Dependency cycle detected  import/no-cycle
  12:1  error  Dependency cycle detected  import/no-cycle
  13:1  error  Dependency cycle detected  import/no-cycle

/Users/jakob/Projects/mercury-parser/src/utils/dom/index.js
   5:1  error  Dependency cycle detected  import/no-cycle
  15:1  error  Dependency cycle detected  import/no-cycle

✖ 11 problems (11 errors, 0 warnings)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

As can be seen a number of cyclic dependency errors are detected. I’m unsure why I’m encountering these. I couldn’t find any other ticket reporting this issue. 😦

Steps to Reproduce

See description above.

I tried running ./preview with another URL just to make sure, but (of course) the same error occurred.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mtashleycommented, Aug 21, 2019

@jfix I’m working on upgrades the packages in this repo and now seeing the ELIFECYCLE issues, it appears related to rollup being outdated. Will follow-up w/ an update once I get the fix merged.

0reactions
jfixcommented, Aug 21, 2019

Thanks @mtashley for continuing to look into my problem! I’ve been able to install mercury-parser globally using npm, but am still encountering the previously reported errors, so I’m kind of glad you do, too! I’ll be waiting for an update (don’t worry, not impatiently!) and would be happy to do testing when/if required.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent failing to compile on CRA when eslint errors?
I installed the new react/CRA version (4). Right now when I have eslint errors the whole page blows and CRA fails to compile....
Read more >
My create-react-app is failing to compile due to ESLint error
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.
Read more >
ESLint not working in VSCode? Help build a troubleshooting ...
Open the command palette by pressing Ctrl / Cmd + Shift + P and select 'ESLint: Show Output Channel'. If ESLint throws any...
Read more >
Command Line Interface - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
XCode 14 compile errors immediatel… - Apple Developer
I'm unable to use XCode 14 to develop my app because as soon as a compiler error is shown, it is immediately withdrawn...
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