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:
- Created 4 years ago
- Comments:5 (5 by maintainers)
@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.
Thanks @mtashley for continuing to look into my problem! I’ve been able to install
mercury-parser
globally usingnpm
, 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.