express-mongoose-es6-rest-api
express-mongoose-es6-rest-api copied to clipboard
Yarn build not working anymore
Hey guys,
I've tried to deploy a new api using this wonderful boilerplate and seems that the package.json have been changed.
Yarn build do not work anymore; is not found.
What is the new way to compile to ES5 for production use ? The readme.md need to be change BTW.
Thanks, Tim
I checked commits before and found this:
"scripts": {
"start": "gulp serve",
"start:debug": "cross-env DEBUG=express-mongoose-es6-rest-api:* yarn start",
"build": "gulp",
"lint": "esw *.js server config --color",
"lint:watch": "yarn lint -- --watch",
"precommit": "yarn lint && yarn test",
"test": "cross-env NODE_ENV=test ./node_modules/.bin/mocha --ui bdd --reporter spec --colors --compilers js:babel-core/register server/tests --recursive",
"test:watch": "yarn test -- --watch",
"test:coverage": "cross-env NODE_ENV=test ./node_modules/.bin/istanbul cover _mocha -- --ui bdd --reporter spec --colors --compilers js:babel-core/register server/tests --recursive",
"test:check-coverage": "yarn test:coverage && istanbul check-coverage",
"report-coverage": "coveralls < ./coverage/lcov.info"
}
seems "build":"gulp", command has been removed in recent commits
Idea of why of sample error with the yarn build?
Same problem
@kunalkapadia
Gulp has been removed with commit c669d339994e238a5d644e67f8051dbcd4df94b3. Babel (transpilation to es5) has been removed with commit 9bb08991d36ea78fcbc6c64f22142d581a4da4c2.
Seems @kunalkapadia wants to avoid transpiling the code to es5, as es6 is the norm now and you don't need to bundle all your project into a single file (according to internet, for example here ).
For a production deployment process, take a look at https://blog.risingstack.com/node-hero-deploy-node-js-heroku-docker/ (tutorial referenced in commit 590a124973b6b5150174fbbab9cc6093f45343c9, and Heroku suggested in the previous reddit link).