shunter icon indicating copy to clipboard operation
shunter copied to clipboard

compile.js fails if public/resources & resources/js is empty

Open jpw opened this issue 7 years ago • 5 comments

compile.js fails if public/resources & resources/js is empty.

All the user gets is an unhelpful Caught exception: TypeError: Cannot convert undefined or null to object with no line number.

I hit this setting up a new project without doing the Getting Started Guide first, and running compile for the first time...

jpw avatar Sep 14 '17 13:09 jpw

Hey @jpw, if I want to have an empty public/resources and resources/js because all our assets are coming from a module, what should I do?

mattrayner avatar Aug 30 '18 14:08 mattrayner

I must be missing something, but I can't get it to process any resources from my module

mattrayner avatar Aug 30 '18 15:08 mattrayner

This is the current project I'm trying to get working for production: https://github.com/ukparliament/augustus

mattrayner avatar Aug 30 '18 15:08 mattrayner

I worked it out - I had to run:

./node_modules/.bin/shunter-build -r pugin-components

Is this documented somewhere that I missed?

mattrayner avatar Aug 30 '18 15:08 mattrayner

Is this documented somewhere that I missed?

I don't think so, the only relevant docu I think is over here

What is also not clear is, if you are not using Shunter's built-in asset handling at all, one does not need to run shunter-build/compile as this only compiles assets, not templates.

jpw avatar Sep 03 '18 11:09 jpw