vue-cli icon indicating copy to clipboard operation
vue-cli copied to clipboard

dist folder not working "Uncaught TypeError: Cannot set property 'render' of undefined

Open albeehsiao917 opened this issue 8 years ago • 9 comments

Version

3.0.1

Reproduction link

Node and OS info

Node:v8.11.3, npm:6.4.1

Steps to reproduce

I have created a new vue cli3 project. There is no problem with "npm run serve" command. Everything is working well. But when i build the project with "npm run build" commad, I find a dist folder with no error. After uploading this folder contents on gituhub I see a blank page with the console error message : Uncaught TypeError: Cannot set property 'render' of undefined at r (componentNormalizer.js:24) at Module.56d7 (Project.vue:9) at c (bootstrap:78) at Object.0 (bootstrap:151) at c (bootstrap:78) at s (bootstrap:45) at 0 (bootstrap:151) at bootstrap:151

What is expected?

this project can run with "npm run build"

What is actually happening?

Uncaught TypeError: Cannot set property 'render' of undefined at r (componentNormalizer.js:24) at Module.56d7 (Project.vue:9) at c (bootstrap:78) at Object.0 (bootstrap:151) at c (bootstrap:78) at s (bootstrap:45) at 0 (bootstrap:151) at bootstrap:151

albeehsiao917 avatar Sep 03 '18 15:09 albeehsiao917

It's caused by the empty script blocks in the components, though I haven't yet figured out why it works in development environment.

haoqunjiang avatar Sep 04 '18 08:09 haoqunjiang

@sodatea u r right

jesse-li avatar Sep 13 '18 03:09 jesse-li

@sodatea Thanks

anshurathee avatar Oct 05 '18 06:10 anshurathee

@sodatea you are life saver bro!!! Awesome

rostismal avatar Oct 24 '18 17:10 rostismal

@sodatea Thanks a lot!

Vishnunair1 avatar Oct 25 '18 05:10 Vishnunair1

Awesome bro......

27As avatar Oct 25 '18 05:10 27As

@sodatea thanks

realdennis avatar Nov 05 '18 18:11 realdennis

what is the solution remove add dummy method, data or props?

abrahamstalin avatar Nov 26 '18 03:11 abrahamstalin

what is the solution remove add dummy method, data or props?

just remove the empty script tag

dhantoot avatar Nov 27 '18 14:11 dhantoot