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";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
npm cache clean --force
.npm install
or yarn install
.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";
import Swal from "sweetalert2";
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