Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'webpack' #89

Closed
lauriii opened this issue Jan 25, 2022 · 4 comments · Fixed by #90
Closed

Cannot find module 'webpack' #89

lauriii opened this issue Jan 25, 2022 · 4 comments · Fixed by #90
Assignees
Labels
squad:devops Issue to be handled by the Devops team. type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@lauriii
Copy link

lauriii commented Jan 25, 2022

📝 Provide detailed reproduction steps (if any)

  1. Ran yarn add --global ckeditor5-package-generator to install package
  2. Ran npx ckeditor5-package-generator @drupal/ckeditor5-test to generate a new plugin

✔️ Expected result

Should have generated @drupal/ckeditor5-test plugin.

❌ Actual result

Error:

$ npx ckeditor5-package-generator @drupal/ckeditor5-test
Cannot find module 'webpack'
Require stack:
- /Users/lauri.eskola/.config/yarn/global/node_modules/@ckeditor/ckeditor5-dev-utils/lib/builds/getdllpluginwebpackconfig.js
- /Users/lauri.eskola/.config/yarn/global/node_modules/@ckeditor/ckeditor5-dev-utils/lib/builds/index.js
- /Users/lauri.eskola/.config/yarn/global/node_modules/@ckeditor/ckeditor5-dev-utils/lib/index.js
- /Users/lauri.eskola/.config/yarn/global/node_modules/ckeditor5-package-generator/lib/index.js

❓ Possible solution

📃 Other details

  • Node: v14.18.1
  • Npm / Yarn: Yarn 1.22.17

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@lauriii lauriii added the type:bug This issue reports a buggy (incorrect) behavior. label Jan 25, 2022
@pomek pomek added the squad:devops Issue to be handled by the Devops team. label Jan 25, 2022
@pomek
Copy link
Member

pomek commented Jan 25, 2022

I can reproduce the issue. So far, the @ckeditor/ckeditor5-dev-utils package misses the webpack dependency. Perhaps defining it in package.json should fix the problem.

@ckeditor/ckeditor5-dev-utils defines peer dependencies which must be installed manually by packages that depend on dev-utils.

@pomek pomek added this to the iteration 51 milestone Jan 26, 2022
@pomek pomek closed this as completed in #90 Jan 28, 2022
pomek added a commit that referenced this issue Jan 28, 2022
Fix (generator): Added the missing `webpack` dependency to the `package.json` file. It fixes the _Cannot find module 'webpack'_ error. The `@ckeditor/ckeditor5-dev-utils` dependency defines peer dependencies, which must be installed manually in the generator package. Closes #89.
@pomek
Copy link
Member

pomek commented Jan 28, 2022

@pomek
Copy link
Member

pomek commented Jan 28, 2022

@lauriii, could you verify whether you can reproduce the issue using the latest version of the tool?

@lauriii
Copy link
Author

lauriii commented Feb 1, 2022

This fixes it, thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squad:devops Issue to be handled by the Devops team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants