gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
73.53k stars 7.38k forks source link

Bug Babel when use flag --source #7263

Open MarlonLuan opened 4 years ago

MarlonLuan commented 4 years ago

What version of Hugo are you using (hugo version)?

$ hugo version
Hugo Static Site Generator v0.70.0-7F47B99E linux/amd64 BuildDate: 2020-05-06T11:18:50Z

Does this issue reproduce with the latest release?

Yes

https://github.com/MarlonLuan/hugo-babel branch master contains code working

https://github.com/MarlonLuan/hugo-babel/tree/bug-babel-0.70 has code not work,

hugo server --source  site

Error: Error building site: BABEL: failed to transform "scripts/main.js" (application/javascript)

bep commented 4 years ago

I started to look at this and registered the related #7287 -- and my initial conclusion is that this is a limitation in Node/node_modules that I suspect would be very hard to get around. If you Google "set node_modules path" or something you will see that we're not alone.