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

Production build is failing with the following errors


Hi Team,

I seem the npm run build is failing with the typescript type checks for some reason. I tried the possible solutions that I could do but I'm not sure how do I fix this. Please suggest me some solutions to resolve this issue.

Please check the detailed info:


12:41:48 AM: $ npm run build
12:41:48 AM: > skinulate@8.1.3 build
12:41:48 AM: > vue-cli-service build
12:41:48 AM: All browser targets in the browserslist configuration have supported ES module.
12:41:48 AM: Therefore we don"t build two separate bundles for differential loading.
12:41:48 AM: - Building for production...
12:42:57 AM: ERROR Failed to compile with 6 errors7:12:57 PM
12:42:57 AM: error in node_modules/vee-validate/node_modules/type-fest/source/camel-case.d.ts:25:32
12:42:57 AM: TS1005: "?" expected.
12:42:57 AM: 23 | OutputString extends string = "",
12:42:57 AM: 24 | > = Words extends [
12:42:57 AM: > 25 | infer FirstWord extends string,
12:42:57 AM: | ^
12:42:57 AM: 26 | ...infer RemainingWords extends string[],
12:42:57 AM: 27 | ]
12:42:57 AM: 28 | ? Options["preserveConsecutiveUppercase"] extends true
12:42:57 AM: error in node_modules/vee-validate/node_modules/type-fest/source/camel-case.d.ts:26:42
12:42:57 AM: TS1005: "?" expected.
12:42:57 AM: 24 | > = Words extends [
12:42:57 AM: 25 | infer FirstWord extends string,
12:42:57 AM: > 26 | ...infer RemainingWords extends string[],
12:42:57 AM: | ^
12:42:57 AM: 27 | ]
12:42:57 AM: 28 | ? Options["preserveConsecutiveUppercase"] extends true
12:42:57 AM: 29 | ? `${Capitalize<FirstWord>}${CamelCaseFromArray<RemainingWords, Options>}`
12:42:57 AM: error in node_modules/vee-validate/node_modules/type-fest/source/join.d.ts:59:36
12:42:57 AM: TS1005: "?" expected.


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 Harshitha,

Thank you for reaching out to us.

Unfortunately, after checking the latest Metronic Vue we were not able to reproduce this error.

From your error, it seems like you have added some extended dependencies which cause this error. Please make sure that you are using those dependencies correctly.

Also if there are any steps on how we can get the same result please let us know so we can check this on our side.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi Lauris,

I'm pretty sure that I've not installed any of the new packages other than what comes along with the download of metronic theme. Kindly advise me if any solution to solve the issue.

Please check the below package.json file.


{
"name": "skinulate",
"version": "8.1.3",
"private": true,
"scripts": {
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"rtl": "webpack --config rtl.config.js",
"serve": "vue-cli-service serve"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.1.2",
"@fullcalendar/core": "^5.9.0",
"@fullcalendar/daygrid": "^5.9.0",
"@fullcalendar/interaction": "^5.9.0",
"@fullcalendar/list": "^5.9.0",
"@fullcalendar/timegrid": "^5.9.0",
"@fullcalendar/vue3": "^5.9.0",
"@popperjs/core": "2.11.5",
"@tinymce/tinymce-vue": "^4.0.4",
"@types/object-path": "^0.11.0",
"@vue/compat": "^3.2.40",
"@vueform/multiselect": "^1.2.5",
"animate.css": "^4.1.1",
"apexcharts": "3.23.1",
"axios": "^0.21.4",
"bootstrap": "5.2.0-beta1",
"bootstrap-icons": "^1.5.0",
"clipboard": "^2.0.6",
"core-js": "^3.8.3",
"deepmerge": "^4.2.2",
"dropzone": "^5.9.3",
"element-plus": "^2.2.4",
"line-awesome": "^1.3.0",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"nouislider": "^14.6.3",
"object-path": "^0.11.8",
"prism-themes": "^1.9.0",
"prismjs": "^1.25.0",
"quill": "^1.3.6",
"socicon": "^3.0.5",
"sweetalert2": "^9.10.12",
"vee-validate": "^4.5.11",
"vue": "^3.2.29",
"vue-axios": "^3.3.7",
"vue-currency-input": "^2.1.0",
"vue-i18n": "^9.1.8",
"vue-inline-svg": "^3.1.0",
"vue-pusher": "^1.1.0",
"vue-router": "^4.0.3",
"vue3-apexcharts": "^1.4.1",
"vuex": "^4.0.0",
"yup": "^0.32.8"
},
"devDependencies": {
"@types/array-sort": "^1.0.0",
"@types/prismjs": "^1.16.2",
"@types/sass-loader": "^8.0.3",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-typescript": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/compiler-sfc": "^3.2.40",
"@vue/eslint-config-typescript": "^9.1.0",
"array-sort": "^1.0.0",
"css-loader": "^6.7.1",
"del": "6.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.0.3",
"mini-css-extract-plugin": "^2.6.1",
"mitt": "^3.0.0",
"prettier": "^2.4.1",
"pusher-js": "^7.4.0",
"rtlcss-webpack-plugin": "4.0.7",
"sass": "^1.32.7",
"sass-loader": "13.0.2",
"typescript": "~4.5.5",
"vue-lodash": "^2.1.2",
"vuex-module-decorators": "^1.0.1",
"webpack": "5.74.0",
"webpack-cli": "4.10.0"
}
}



Hi,

Do you have the same build error in the default Metronic Vue package?

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,

Yes, I have the same error with the default metronic vue package in my local. I couldn’t solve the issue and tried all possible solutions. Please suggest to me if you know of any other solution to try.

However, I managed to fix it by installing Vite for build and compiling assets.



Hi,

Glad to hear that. The Vite dependency is required to build project successfully and Vite is included in a default Metronic Vue.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,

Can you please confirm which version is having the Vite in metronic vue? Also, I did not get the full files when I downloaded v8.1.3, please advise.



Hi,

We have migrated to Vite in Metronic v8.1.6 so if you are using v8.1.3 it shouldn't require Vite dependency. We highly recommend using the latest version since it is more complete and contains all the latest fixes.

You can download the latest Metronic version from Metronic Downloads page.

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  :(