angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.13k stars 1.24k forks source link

Sequelize AND Mongo Build troubles #2796

Closed EAlwine closed 4 years ago

EAlwine commented 4 years ago

I recently Implemented sequelize in a MongoDB version of this scaffold. works great in development mode, but when I build something goes wrong with the mapping.

Looking at other scaffolds where sequelize was chosen, I see a gruntfile In place of a gulpfile. I know that these frameworks serve basically the same purpose.

My question is: do i need to implement grunt in order to make sequelize build to dist properly or can I modify my gulpfile to do the same thing?

Here's the output of the error when I run it in production mode:

`/home/ubuntu/NECSPortal/dist/server/SQL/CoilInventory.js.map:1 (function (exports, require, module, filename, dirname) { {"version":3,"sources":["SQL/CoilInventory.js"],"names":["module","exports","sequelize","DataTypes","define","ID","type","INTEGER","allowNull","primaryKey","autoIncrement","COID","STRING","SID","PO","CHAR","RawSteelID","NoOfCoils","TotalSkidWeight","DECIMAL","CoilWeight","DateReceived","DATE","DateUsed","VendorID","DateAdded","DateStagedForPurchase","DatePrintedForPurchase","LabelPrinted","BOOLEAN","tableName"],"mappings":";;AAAA;;AAEAA,OAAOC,OAAP,GAAiB,UAASC,SAAT,EAAoBC,SAApB,EAA+B;AAC/C,QAAOD,UAAUE,MAAV,CAAiB,eAAjB,EAAkC;AACxCC,MAAI;AACHC,SAAMH,UAAUI,OADb;AAEHC,cAAW,KAFR;AAGHC,eAAY,IAHT;AAIHC,kBAAe;AAJZ,GADoC;AAOxCC,QAAM;AACLL,SAAMH,UAAUS,MADX;AAELJ,cAAW;AAFN,GAPkC;AAWxCK,OAAK;AACJP,SAAMH,UAAUS,MADZ;AAEJJ,cAAW;AAFP,GAXmC;AAexCM,MAAI;AACHR,SAAMH,UAAUY,IADb;AAEHP,cAAW;AAFR,GAfoC;AAmBxCQ,cAAY;AACXV,SAAMH,UAAUY,IADL;AAEXP,cAAW;AAFA,GAnB4B;AAuBxCS,aAAW;AACVX,SAAMH,UAAUI,OADN;AAEVC,cAAW;A

SyntaxError: Unexpected token : at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:616:28) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Sequelize.import (/home/ubuntu/NECSPortal/dist/node_modules/sequelize/lib/sequelize.js:481:62) at /home/ubuntu/NECSPortal/dist/server/SQL/index.js:29:34 at Array.forEach () at Object. (/home/ubuntu/NECSPortal/dist/server/SQL/index.js:28:4) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (/home/ubuntu/NECSPortal/dist/server/app.js:19:12) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) ubuntu@ip-172-31-12-55:~$`

Item Version
generator-angular-fullstack 5.0.0 (this is the version I have installed, may not be what generated the scaffold originally)
Node 8.16.0
npm 6.4.1
Operating System Ubuntu 15.10
etc etc
Item Answer
Transpiler Babel
Markup HTML
CSS SCSS
Router ui-router
Client Tests Mocha
DB MongoDB / SQL BOTH!!
Auth Y
etc etc