Open samit4me opened 5 years ago
When using vscode the current working directory can be inconsistent across platforms, see https://github.com/Microsoft/vscode/issues/47195.
More details with example projects can be found in this issue https://github.com/HeroProtagonist/eslint-plugin-module-resolver/issues/15.
One possible solution would be to use __dirname (e.g. const [projectRoot] = path.resolve(__dirname).split("/node_modules")).
__dirname
const [projectRoot] = path.resolve(__dirname).split("/node_modules")
When using vscode the current working directory can be inconsistent across platforms, see https://github.com/Microsoft/vscode/issues/47195.
More details with example projects can be found in this issue https://github.com/HeroProtagonist/eslint-plugin-module-resolver/issues/15.
One possible solution would be to use
__dirname
(e.g.const [projectRoot] = path.resolve(__dirname).split("/node_modules")
).