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

[number-field] Module not found #8362

Closed
SebastianBock83 opened this issue Dec 18, 2024 · 2 comments · Fixed by #8363
Closed

[number-field] Module not found #8362

SebastianBock83 opened this issue Dec 18, 2024 · 2 comments · Fixed by #8363

Comments

@SebastianBock83
Copy link

SebastianBock83 commented Dec 18, 2024

Description

When building our componets with an included @vaadin/vaadin reference with webpack, we are facing an error with current vaadin version 24.6.0.

ERROR in ./node_modules/@vaadin/number-field/src/vaadin-number-field-mixin.js 7:0-82 Module not found: Error: Can't resolve '@vaadin/component-base/src/tooltip-controller' in '[PROJECT_PATH]\node_modules\@vaadin\number-field\src' Did you mean 'tooltip-controller.js'? BREAKING CHANGE: The request '@vaadin/component-base/src/tooltip-controller' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.

I checked the ./node_modules/@vaadin/number-field/src/vaadin-number-field-mixin.js file which imports the scripts and added the .js extension for testing and the build was done successfully.

The imports originally looking like this:

import { getDeepActiveElement } from '@vaadin/a11y-base/src/focus-utils.js';
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller';
import { InputController } from '@vaadin/field-base/src/input-controller.js';
import { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';
import { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';

so I asume that the extensions were forgotten to add?

Could you please fix this issues in short term, so that our builds can be done without the manually changes?

Expected outcome

The result should be a proper build without the log errors which causes the build to break.

Minimal reproducible example

Because this is no script error, but an infrastructure error, I am not able to provide an example.

A way to reproduce this, would be to use a webpack / vite environment and run a build with an index.js which imports @vaadin/vaadin and see if the error occurs.

Steps to reproduce

  1. integrate @vaadin/vaadin into your code
  2. run a webpack / vite build
  3. see the error message on the build log

Environment

Vaadin version(s): 24.6.0
OS: Windows 10

Browsers

Issue is not browser related

@web-padawan
Copy link
Member

Sorry about the inconvenience, we missed this in #8254. Created a PR with a fix which will land in 24.6.1: #8363

@SebastianBock83
Copy link
Author

@web-padawan thanks for the really fast feedback.

Is there an estimation when the version will be released?

Best Regards,
Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants