-
Notifications
You must be signed in to change notification settings - Fork 4.2k
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
@Idself Did you try running npm with the --legacy-peer-deps flag?
Replies: 1 comment 2 replies
-
@Idself Did you try running npm with the --legacy-peer-deps flag?
Beta Was this translation helpful? Give feedback.
All reactions
-
That appears to have worked. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions
-
🚀 1
-
You're welcome!
Beta Was this translation helpful? Give feedback.