简体   繁体   中英

Vue module build failed (from ./node_modules/vue-loader/lib/loaders/templateLoader.js)

I google like 1 hour for this error and still found no fix.

Anyone have any idea why this happen and how can I fix it?

Here it is the full error message:

 ERROR  Failed to compile with 1 errors  
 Module build failed (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
 RangeError: Invalid string length

Thank you!

Make sure you have vue-loader and vue-template-compiler in the dev dependencies in package.json file.

"devDependencies": {
    ....
    "vue": "^2.6.11",
    "vue-loader": "^15.5.1",
    "vue-template-compiler": "^2.6.11"
},

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM