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

Missing dependencies on node modules #3696

Closed
hschletz opened this issue Jan 30, 2023 · 3 comments · Fixed by #3752
Closed

Missing dependencies on node modules #3696

hschletz opened this issue Jan 30, 2023 · 3 comments · Fixed by #3752
Assignees
Labels
2. developing Work in progress bug Something isn't working regression Regression of a previous working feature

Comments

@hschletz
Copy link

After upgrading to 7.x, webpack build failed with several messages like:

Module not found: Error: Can't resolve 'assert' in '[...]/node_modules/@nextcloud/vue/dist'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

Same for the "buffer" and "util" modules. As a workaround, I added those packages to my project:

npm install assert buffer util

The commonly suggested fallback configuration was not necessary.

Shouldn't these dependencies be handled by the nextcloud-vue package?

@ChristophWurst
Copy link
Contributor

ChristophWurst commented Jan 30, 2023

Found the same issue with nextcloud/mail#7954

       ERROR in ./node_modules/@nextcloud/vue/dist/Components/NcActions.js 2:127801-127818
      Module not found: Error: Can't resolve 'assert' in '/tmp/krankerl.x5y0zn6eHsXS/mail/node_modules/@nextcloud/vue/dist/Components'

      BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
      This is no longer the case. Verify if you need this module and configure a polyfill for it.

The app uses webpack v5.75.0

@ChristophWurst ChristophWurst added bug Something isn't working 1. to develop Accepted and waiting to be taken care of regression Regression of a previous working feature labels Jan 30, 2023
@raimund-schluessler
Copy link
Contributor

I was wondering why my apps were not affected, but it's probably because they use @nextcloud/webpack-vue-config which brings a peer dependency to node-polyfill-webpack-plugin. Maybe we should add this peer dependency to @nextcloud/vue as well, so it also works without using @nextcloud/webpack-vue-config (although it's not a bad thing to use the shared webpack config 😉).

@ChristophWurst
Copy link
Contributor

If this lib has a peer it expects then it should been in package.json 👍

@GretaD GretaD self-assigned this Feb 14, 2023
@ChristophWurst ChristophWurst added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug Something isn't working regression Regression of a previous working feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants