1

I have used generator-angular-fullstack, and I have deployed on Heroku and all works. But I have tried to add some module (angular-bootstrap), and when I try to deploy on Heroku I have this problem:

Uncaught SyntaxError: Unexpected token <         8e80b874.vendor.js:1
Uncaught SyntaxError: Unexpected token <         e1807e47.scripts.js:1

These are my steps to deploy on Heroku (the first time):

>> grunt build
>> cd dist
>> git push heroku master
>> heroku ps:scale web=1
>> heroku config:add NODE_ENV=production
>> heroku open

These are my steps to update my project on Heroku:

>> grunt build
>> cd dist
>> git commit -m "commit coment"
>> git push heroku master
>> heroku open

The problem is when I try to add some module in my angular project ('ui-router','ui.bootstrap'), in local works perfectly but when I deploy on Heroku I have the problem:

Uncaught SyntaxError: Unexpected token < 8e80b874.vendor.js:1

I have tried to set the paht in heroku:

heroku config:set NODE_PATH=lib

and force to add the lib folder inside my dist folder

git add -f lib/

I am lost... Any idea?? Thx

Enrique Aparicio
  • 807
  • 1
  • 7
  • 19
  • the "<" is due to express config sending the index.html on all unfound requests. I guess "8e80b874.vendor.js" is not present on your dist folder, or index.html references the wrong vendor file path – meriadec Jun 25 '14 at 14:19
  • I think you need to `git add .` before you commit in `dist/`. Also, did you install those modules with `bower install --save`? – JaKXz Jul 12 '14 at 21:48
  • Thanks. It was a bug in this version of generator. I have moved to mean.io :p – Enrique Aparicio Jul 16 '14 at 09:53
  • What was the bug? The [git add requirement](https://github.com/DaftMonk/generator-angular-fullstack/issues/65) is a known issue, and all it requires is a `grunt release` task to be written (or PR'd in :) – JaKXz Jul 20 '14 at 06:06

0 Answers0