Potential Breaking Change in `resolveConfig`
See original GitHub issueIt seems that 2.0 may have introduced an unintended breaking change in the resolveConfig
function. This function is used in the Prettier VS Code extension here: https://github.com/prettier/prettier-vscode/blob/master/src/ConfigResolver.ts#L99
Since upgrading to 2.0 we are now seeing errors when trying to resolve configs:
Error: Cannot find module 'prettier-config-greenelab' from 'c:\Users\Vincent\Desktop\adage-frontend'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:717:15)
at Function.n.resolve (c:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:15:584)
at Object.transform (c:\Users\Vincent\.vscode\extensions\esbenp.prettier-vscode-4.0.0\node_modules\prettier\index.js:23283:40)
at run (c:\Users\Vincent\.vscode\extensions\esbenp.prettier-vscode-4.0.0\node_modules\prettier\third-party.js:11472:51)
at async cacheWrapper (c:\Users\Vincent\.vscode\extensions\esbenp.prettier-vscode-4.0.0\node_modules\prettier\third-party.js:11300:20)
at async cacheWrapper (c:\Users\Vincent\.vscode\extensions\esbenp.prettier-vscode-4.0.0\node_modules\prettier\third-party.js:11300:20)
at async cacheWrapper (c:\Users\Vincent\.vscode\extensions\esbenp.prettier-vscode-4.0.0\node_modules\prettier\third-party.js:11300:20)
at async cacheWrapper (c:\Users\Vincent\.vscode\extensions\esbenp.prettier-vscode-4.0.0\node_modules\prettier\third-party.js:11300:20)
at async cacheWrapper (c:\Users\Vincent\.vscode\extensions\esbenp.prettier-vscode-4.0.0\node_modules\prettier\third-party.js:11300:20)
at async Explorer.search (c:\Users\Vincent\.vscode\extensions\esbenp.prettier-vscode-4.0.0\node_modules\prettier\third-party.js:11457:22)
at async Promise.all (index 0)
For repro steps and more details see: https://github.com/prettier/prettier-vscode/issues/1289
One thing to note, is that everything behaves as expected from the CLI which is odd.
Issue Analytics
- State:
- Created 3 years ago
- Comments:32 (30 by maintainers)
Top Results From Across the Web
Migration Guide | Detox
These migration guides refer to breaking changes. If a newer version has no entries in this document, it means it does not require...
Read more >breaking change since webpack 5: the devtool option is more strict.
In Webpack 4 it was possible to value this with an empty string. webpack 5 is more strict. Webpacks devtool configuration. Open side...
Read more >Changelog
Breaking changes. cssnano & its plugins have been upgraded to PostCSS 6.x. Please ensure that for optimal results that you use cssnano with ......
Read more >Blog | Detekt
A silent configuration would exclude all possible processors and reports ... in the older versions due to breaking changes in RC13 and RC15....
Read more >Configuration System
Default values also become hard to change without breaking backwards compatibility. ... config.cfg") resolved = registry.resolve(config) optimizer ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay, I’m about to submit a PR.
I have a fix:
require('module').createRequire(dir).resolve.length === 2