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

Build errors with dayjs imports #41

Open
tranelearth opened this issue Mar 30, 2022 · 3 comments
Open

Build errors with dayjs imports #41

tranelearth opened this issue Mar 30, 2022 · 3 comments

Comments

@tranelearth
Copy link

I am getting the following type of error for each of the dayjs imports at the top of node_modules/@infectoone/vue-ganttastic/dist/library.mjs when npm builds:

ERROR in ./node_modules/@infectoone/vue-ganttastic/dist/library.mjs 3:0-55
Module not found: Error: Can't resolve 'dayjs/plugin/isSameOrAfter' in '{local path}/node_modules/@infectoone/vue-ganttastic/dist'
Did you mean 'isSameOrAfter.js'?
BREAKING CHANGE: The request 'dayjs/plugin/isSameOrAfter' 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.

A numbers of google searches have led me to add

module: {
    rules: [{
        test: /\.m?js/,
        resolve: {
            fullySpecified: false,
        }
    }]
}

to my webpack.config.js file, but that did not solve the problem.

I'm currently on version 3.2.31 of Vue, and 2.0.2 of vue-ganttastic.

@robben779
Copy link

Same error:

isSameOrBefore.js
isSameOrAfter.js
isBetween.js
customParseFormat.js

"vue": "^3.2.31",
"@infectoone/vue-ganttastic": "^2.0.4",

@thiagoreri
Copy link

I have the same problem

@dpschen
Copy link
Contributor

dpschen commented Dec 13, 2022

This was solved by #62.
See the added .js suffix for these imports: https://github.com/InfectoOne/vue-ganttastic/blob/master/src/vue-ganttastic.ts#L3-L6

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

No branches or pull requests

4 participants