generator-sails-rest-api icon indicating copy to clipboard operation
generator-sails-rest-api copied to clipboard

i have to manually install all dependencies. is this a joke?

Open redoc123 opened this issue 6 years ago • 5 comments

The whole point of giving out a generator is to save time and cut down the time spent on figuring out basic tasks.

This generator does nt include any of the runtime dependencies in package.json. The way to get it working it run and install missing packages one at a time.

Sorry dont mean to undermine your effort for the community but i find it plain irresponsible.

redoc123 avatar Apr 08 '18 06:04 redoc123

@redoc123 it does. When you're choosing additional services, it modifies dependencies list which are installing via yeoman.

ghaiklor avatar Apr 08 '18 08:04 ghaiklor

@ghaiklor thanks for quick response for my "impatient" question. I am not seeing any of the packages being added to package.json. please advise.

I created a project with following options:

Application questions: ? Application name sails-rest-api

Configuration questions: ? Database adapter Mongo ? Database host localhost ? Database name sails-rest-api ? Database username ? Database password [hidden] ? Enable CORS? Yes

Logger questions: ? Choose which logger you want to configure Winston

Blueprint questions: ? Use overridden blueprints? Yes

Controller questions: ? Choose which predefined controllers you want to copy PingController, SearchController

Hook questions: ? Choose which predefined hooks you want to copy CountHook, PluralizeHook

Cron questions: ? Do you need cron? Yes

Swagger questions: ? Do you need Swagger UI Explorer? Yes

Authentication questions: ? Do you need authentication layer? Yes ? Secret key 74a13d37f8bf44138c564b02d8bbb48dc555d2ee0fd9a78594c16f5d8135f22d

Service questions: ? Select which services you want to use CipherService, HashService, ImageService, LocationService, MailerService, PusherService, SmsService ? Image provider IM ? Location provider Google ? Mailer provider SendGrid ? SMS provider Twilio

This is my package.json

{ "name": "sails-rest-api", "version": "0.1.0", "main": "app.js", "dependencies": { "rc": "1.1.6", "sails": "0.12.14" }, "devDependencies": { "esdoc": "0.4.3", "chai": "3.4.1", "istanbul": "0.4.2", "mocha": "2.3.4", "sails-memory": "0.10.5", "sinon": "1.17.2" }, "scripts": { "clean": "rm -rf ./.tmp", "debug": "node debug app.js", "docs": "esdoc -c esdoc.json", "start": "node app.js", "test": "istanbul cover _mocha" } }

redoc123 avatar Apr 08 '18 18:04 redoc123

hm... it should add sails-service packages... Seems like a bug and needs investigation why this is happening. Do you want to try debug it?

ghaiklor avatar Apr 10 '18 09:04 ghaiklor

Hi, I just used your generator and I have the same problem - package.json was empty and I had to install all dependencies manually

nastil avatar Aug 11 '18 12:08 nastil

By empty I mean most dependencies where missing

nastil avatar Aug 11 '18 12:08 nastil