Open KlemenS189 opened 5 years ago
@KlemenS189 Thanks for posting! We'll take a look as soon as possible.
In the mean time, there are a few ways you can help speed things along:
Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.
For help with questions about Sails, click here.
Hi @KlemenS189 I was not able to reproduce this issue. Could you try to $rm -rf node_modules/ package-lock.json .npmrc
and then do a fresh $npm install
If that does not work can you please try to generate a new sails project again and see if you come up with the same issue?
sails new your-app-name --no-frontend
Hi @raqem I am also facing same issue. I also tried $rm -rf node_modules/ package-lock.json .npmrc
and then do a fresh $npm install
but it didn't worked at all.
I have also tried to create new project with older version (v 1.2.1) but facing same issue.
Node version: v12.7.0 Sails version (sails): 1.2.3 OS Windows 10 and Ubuntu 18.04
Whenever I try to create a new project,
sails new demo-api --no-front-end
then in the project directory, I tried to run sails lift
it is throwing errors,
error: Bootstrap encountered an error: (see below) error: error: TypeError: Cannot read property 'readJson' of undefined at Object.module.exports.bootstrap (/var/www/html/demo-api/config/bootstrap.js:40:55) at /var/www/html/demo-api/node_modules/sails/lib/app/private/bootstrap.js:73:34
@abhishekkhaware @raqem I commented over in gitter here https://gitter.im/balderdashy/sails?at=5d428d1a3e05746cc8a2246a
Looks like --no-front-end
& choosing the "Web App" starter doesn't pull in sails-hook-organics but the generated config/bootstrap.js
tries to use sails.helpers.fs.readJson
🤷♂
@nahanil Yes, you are right. I installed the sails-hook-organics
package with npm i --save sails-hook-organics
It is working fine now.
I think, this package should be included by default or at-least mentioned in documentation and readme file.
CC @raqem
@KlemenS189 @nahanil @abhishekkhaware
Hi, all!
I was able to replicate this error by creating a new app with sails new test-app-name --no-front-end
, selecting 1. Web App
when prompted, and then running sails lift
.
When I installed sails-hook-organics
as described by @abhishekkhaware, I was able to lift without any issues.
We'll have to give some thought to how we want to resolve this issue. Thanks so much for bringing it to our attention!
The Sails team has converged to discuss this issue! Since the web app is so frontend-heavy, we're probably going to resolve this problem by displaying an error if you try to select the Web App option when creating a new no-front-end Sails app.
I think, there should be no selection option, when we create new with no-front-end flag. It should always create empty project.
@abhishekkhaware—good thought! I'll take it up with the team.
I think, there should be no selection option, when we create new with no-front-end flag. It should always create empty project.
I agree. I was a little perturbed when I saw this. All together I love Sails
displaying an error if you try to select the Web App option when creating a new no-front-end Sails app
This is a good plan -- I'm ok with either an error or not showing the prompt (if --no-front-end
, act like --traditional
is also set). Will be a PR to sails-generate.
Node version: v10.15.0 Sails version (sails): 1.2.2
I created a new app with
--no-front-end
as I only want REST API functionality. When trying to usesails lift
I get the following error:
TypeError: Cannot read property 'readJson' of undefined
This is the traceback:
at Object.module.exports.bootstrap (\config\bootstrap.js:40:55) at \node_modules\sails\lib\app\private\bootstrap.js:73:34 at Sails.runBootstrap (\node_modules\sails\lib\app\private\bootstrap.js:97:5) at Sails.wrapper [as runBootstrap] (\node_modules\@sailshq\lodash\lib\index.js:3275:19) at Sails.initialize (\node_modules\sails\lib\app\private\initialize.js:67:9) at Sails.wrapper [as initialize] (\node_modules\@sailshq\lodash\lib\index.js:3275:19) at \node_modules\sails\lib\app\lift.js:63:13 at \node_modules\sails\node_modules\async\dist\async.js:3853:24 at replenish (\node_modules\sails\node_modules\async\dist\async.js:946:17) at iterateeCallback (\node_modules\sails\node_modules\async\dist\async.js:931:17) at \node_modules\sails\node_modules\async\dist\async.js:906:16 at \node_modules\sails\node_modules\async\dist\async.js:3858:13 at \node_modules\sails\lib\app\load.js:279:13 at \node_modules\sails\node_modules\async\dist\async.js:421:16 at processQueue (\node_modules\sails\node_modules\async\dist\async.js:1565:20) at taskComplete (\node_modules\sails\node_modules\async\dist\async.js:1588:9)
I haven't done anything else since creating new project.