express-mongoose-es6-rest-api icon indicating copy to clipboard operation
express-mongoose-es6-rest-api copied to clipboard

Yarn build not working anymore

Open alexandre-jalat opened this issue 7 years ago • 5 comments

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

alexandre-jalat avatar Apr 15 '18 21:04 alexandre-jalat

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

roymina avatar Apr 26 '18 07:04 roymina

Idea of why of sample error with the yarn build?

danieloquendo avatar May 30 '18 01:05 danieloquendo

Same problem

ivklgn avatar Jun 04 '18 10:06 ivklgn

@kunalkapadia

alfonmga avatar Jun 21 '18 20:06 alfonmga

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).

xAt0mZ avatar Jul 05 '18 14:07 xAt0mZ