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

Remove exports field to fix eslint and build errors #393

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

Pytal
Copy link
Collaborator

@Pytal Pytal commented Sep 13, 2022

Fix errors in nextcloud/server#34044

The eslint errors import/no-unresolved and node/no-missing-import are due to the lack of support for the exports field, see import-js/eslint-plugin-import#1810 and mysticatea/eslint-plugin-node#255

Switching from

import '@nextcloud/password-confirmation/style.css'

to

import '@nextcloud/password-confirmation/dist/style.css'

fixes the eslint errors but results in new build errors coming from babel-loader

Module not found: Error: Package path ./dist/style.css is not exported from package <path>/node_modules/@nextcloud/password-confirmation (see exports field in <path>/node_modules/@nextcloud/password-confirmation/package.json)

This seems to be because babel-loader uses the exports field exclusively when present

So switching to the dist import in nextcloud/server#34044 and removing the exports field in this package is needed to resolve the errors

…ronments

Signed-off-by: Christopher Ng <chrng8@gmail.com>
@Pytal Pytal added bug Something isn't working 3. to review Waiting for reviews labels Sep 13, 2022
@Pytal Pytal added this to the 4.0.0 milestone Sep 13, 2022
@Pytal Pytal self-assigned this Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants