Skip to content

Missing development dependencies in frontend_addon #161

Open
@wesleybl

Description

@wesleybl

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions