Nuxt: Could Not Compile Template
Solution 1:
I had the exact issue, it turned out to be a path issue in my nuxt.config.js file under css and scripts sections. I added a assets folder with sub folders and files within them such as static > assets > etc but in my config file it was ~/assets.
I changed it to ~/static/assets/ and now it compiles correctly.
Hope this helps.
Solution 2:
I'm starting out with Nuxt.js too! So far, at least for my navbar where I have the static pages linked to, I have my static files routed in the nuxt.config.js
file under generate : { routes: ["file/", "file2/"] }
. Each those files are .vue files under my pages
directory. Now, when I run npm run dev
, I can click into each of those files on my navbar and they come up perfectly. Hope this helps! Comment below if I'm unclear.
Post a Comment for "Nuxt: Could Not Compile Template"