Open
Description
My IDE Editor runs eslint on the opened file. When I open the file. When I open the file:
my-package/packages/my-package/src/index.js
the Editor shows the error:
Parsing error: Cannot find module 'babel-preset-razzle'
Require stack:
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/index.js
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/index.js
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@babel/eslint-parser/lib/worker/babel-core.cjs
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@babel/eslint-parser/lib/worker/handle-message.cjs
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@babel/eslint-parser/lib/client.cjs
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@babel/eslint-parser/lib/index.cjs
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
Make sure that all the Babel plugins and presets you are using
are defined as dependencies or devDependencies in your package.json
file. It's possible that the missing plugin is loaded by a preset
you are using that forgot to add the plugin to its dependencies: you
can workaround this problem by explicitly adding the missing package
to your top-level package.json.
After adding babel-preset-razzle
as a development dependency, I get the error:
Parsing error: Cannot find module 'babel-plugin-react-intl'
Require stack:
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/index.js
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/index.js
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@babel/eslint-parser/lib/worker/babel-core.cjs
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@babel/eslint-parser/lib/worker/handle-message.cjs
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@babel/eslint-parser/lib/client.cjs
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@babel/eslint-parser/lib/index.cjs
- /home/user/git/my-package/node_modules/.pnpm/@[email protected]/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
Make sure that all the Babel plugins and presets you are using
are defined as dependencies or devDependencies in your package.json
file. It's possible that the missing plugin is loaded by a preset
you are using that forgot to add the plugin to its dependencies: you
can workaround this problem by explicitly adding the missing package
to your top-level package.json.
After adding babel-plugin-react-intl
as a development dependency, I no longer get errors:
Metadata
Metadata
Assignees
Labels
No labels