Common Issues
Build issues
TIP
Issues occuring when installing, starting a dev environment or when building
error when starting runing npm install: npm ERR! ERESOLVE unable to resolve dependency tree
Upgrade your node to latest LTS version: https://nodejs.org/
Upgrade npm to npm v7 by runingnpm install --global npm
npm WARN read-shrinkwrap This version of npm is compatible with [email protected], but package-lock.json was generated for [email protected] I'll try to do my best with it
You need to update your npm version to v7.x.x which does support [email protected]
npm i -g npm
You will need to remove and reinstall your
node_modules
and revert changes made to thepackage-lock.json
file after updating npm
npm i --force
error when starting dev server: xxxx/vite.config.ts:230 if (!config?.isProduction) ^ SyntaxError: Unexpected token ’.’
Your node version does not support
Optional chaining (?.)
operator which is introduced in Node V14. Upgrade your node to latest LTS version: https://nodejs.org/
error when starting dev server: node_modules/@vueuse/core/node_modules/vue-demi/lib/index.mjs:2:30: error: Could not resolve "@vue/composition-api/dist/vue-composition-api.esm.js"
Install
vue-demi ^0.11.2
package which is needed by@vueuse/core
npm i vue-demi --force
[vite-plugin-pwa] [vite]: Rollup failed to resolve import "/demo/xxxx" from "src/xxxx".
This is due to demo images that we can not bundle into the final release according to envato rules.
Editvite.config.ts
file and uncomment therollupOptions
section:
export default defineConfig({
//...
build: {
/**
* Uncomment this section to build the demo with missing images
* Don't forget to remove this section when you replaced assets with yours
*/
rollupOptions: {
external: [/\/demo\/.*/],
},
},
//...
});
Runtime issues
TIP
Issues occuring in browser
TypeError: Failed to fetch dynamically imported module: http://127.0.0.1:8080/assets/elements.xxx.js
This is due to demo images that we can not bundle into the final release according to envato rules. Replace
/demo/([^'"]+)
and replace withhttps://vulk.cssninja.io/demo/$1
using a regex (in visual studio code it's the.*
icon)
[Vue Router warn]: No match found for location with path "/"
Replace
import routes from 'pages-generated'
withimport routes from 'virtual:pages-generated'
insrc/router.ts