Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

There are some errors that occur after running "npm run build" in vue-demo8.


After downloading the Vue version of demo8, an error occurred when running "npm run build".

error:
transforming (2239) node_modules/@fullcalendar/vue3/dist/custom-content-type.jssrc/components/modals/wizards/create-app-modal/CreateAppModalForm.vue:61:18 - error TS2306: File '/Volumes/projects/vueProject/demo/node_modules/sweetalert2/sweetalert2.d.ts' is not a module.

61 import Swal from "sweetalert2/dist/sweetalert2.js";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (7)


Hi,

I am sorry to hear that you faced this issue. I will do my best to help.

Could you please specify which Metronic version are you using?

Also if you have made any changes to our codebase please describe them.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



I am using v8.1.8, and I have not made any modifications to the code repository. I downloaded and extracted it, then ran npm run dev, which worked fine. However, when I ran npm run build afterwards, an error occurred.



Hi,

Thank you for clarifying this.

We checked this in more detail but unfortunately still we were not able to reproduce this error.

Can you please specify your npm version?

Also, try to clear npm cache and reinstall npm dependencies.


  1. Delete node_modules and yarn.lock/pacakge-lock.json.

  2. Run command to clear npm cache npm cache clean --force.

  3. Then install dependencies again with npm install or yarn install.



Regards,
Lauris Stepanovs,
Keenthemes Support Team

npm v9.6.0, I tried the method you provided, but the problem still persists. After that, I re-extracted the compressed file and ran it again, but the same error still occurred.

Errors Files
1 src/components/modals/wizards/create-app-modal/CreateAppModalForm.vue:61
1 src/views/crafted/authentication/basic-flow/PasswordReset.vue:76
1 src/views/crafted/pages/wizards/Horizontal.vue:143
1 src/views/crafted/authentication/basic-flow/SignIn.vue:170
1 src/components/modals/forms/ExportCustomerModal.vue:159
1 src/components/modals/forms/NewEventModal.vue:187
1 src/views/crafted/authentication/basic-flow/SignUp.vue:229
1 src/views/crafted/pages/wizards/Vertical.vue:247
1 src/components/modals/forms/CreateAPIKeyModal.vue:256
1 src/views/crafted/authentication/MultiStepSignUp.vue:299
1 src/components/modals/wizards/TwoFactorAuthModal.vue:301
1 src/components/modals/forms/NewCardModal.vue:310
1 src/components/modals/forms/NewTargetModal.vue:319
1 src/components/modals/forms/AddCustomerModal.vue:332
1 src/components/modals/forms/NewAddressModal.vue:358
1 src/components/modals/wizards/CreateAccountModal.vue:1081
1 src/views/crafted/account/Settings.vue:2256
transforming (2274) src/assets/ts/_utils/models/OffsetModel.tsERROR: "type-check" exited with 2.



Hi,

We still were not able to reproduce this error. As I see from your error message it seems like the error is related to the Swal import.

Try to replace the import

import Swal from "sweetalert2/dist/sweetalert2.js";

to

import Swal from "sweetalert2";


Regards,
Lauris Stepanovs,
Keenthemes Support Team



Thank you very much for your help.After replacing, there are no errors anymore. Import Swal from "sweetalert2/dist/sweetalert2.js"; (which already exists in the source code). I wonder if there is a problem with the files in the compressed package itself!



Hi,

Glad to hear that. All the best with your project!

Please let us know if you have any further questions on this topic or anything else.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(