Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

yarn format:verify not working #1864

Answered by KTom101
ldself asked this question in Q&A
Discussion options

I'm attempting to contribute a new term entry but when i try to locally test the format I get the following error:

% yarn format:verify
yarn run v1.22.19
warning ../../package.json: No license field
$ prettier "./**/*.(ts|md)" --list-different
[error] Invalid configuration file .github/CODE_OF_CONDUCT.md: Cannot find module '@codecademy/prettier-config'
[error] Require stack:
[error] - /Users//Projects/docs_codecademy/.prettierrc.js
[error] - /usr/local/lib/node_modules/prettier/third-party.js
[error] - /usr/local/lib/node_modules/prettier/index.js
[error] - /usr/local/lib/node_modules/prettier/cli.js
[error] - /usr/local/lib/node_modules/prettier/bin-prettier.js
error Command failed with exit code 2.

I tried installing the @codeacademy/prettier-config module using 'nvm i @codecademy/prettier-config' but I get the following message:
% npm i @codecademy/prettier-config
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: codecademy-docs@1.0.0
npm ERR! Found: eslint@7.32.0
npm ERR! node_modules/eslint
npm ERR! dev eslint@"^7.25.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^6.5.1" from @codecademy/eslint-config@3.1.7
npm ERR! node_modules/@codecademy/eslint-config
npm ERR! dev @codecademy/eslint-config@"^3.1.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

I'm not sure what to do at this point. I don't want to force anything, but I don't know how to resolve the dependencies.

Any help is appreciated.

You must be logged in to vote

@Idself Did you try running npm with the --legacy-peer-deps flag?

Replies: 1 comment 2 replies

Comment options

@Idself Did you try running npm with the --legacy-peer-deps flag?

You must be logged in to vote
2 replies
Comment options

That appears to have worked. Thanks!

Comment options

You're welcome!

Answer selected by ldself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /