machineghost
machineghost

Reputation: 35725

Grunt error and blank page on `sails lift`

I followed the (extremely simple) instructions here: http://sailsjs.org/get-started.

However, when I tried running sails lift it just gave me a blank page because I had a problem with my grunt install. I reinstalled it, which fixed the errors, but now I still have a blank page when I visit localhost:1337. I know something is working, because when I stop running sails lift I don't even get a blank page, but I'm not seeing the expected homepage.ejs.

My output when I run sails lift is:

sails lift
info: Starting app...

info: 
info:                .-..-.
info: 
info:    Sails              <|    .-..-.
info:    v0.11.0             |\
info:                       /|.\
info:                      / || \
info:                    ,'  |'  \
info:                 .-'.-==|/_--'
info:                 `--'-------'
info:    __---___--___---___--___---___--___
info:  ____---___--___---___--___---___--___-__
info: 
info: Server lifted in `C:\Users\Me\WebstormProjects\GameWorldCraft`
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press <CTRL> + C at any time.

debug: --------------------------------------------------------
debug: :: Sat Aug 22 2015 12:24:00 GMT-0700 (Pacific Daylight Time)

debug: Environment : development
debug: Port        : 1337
debug: --------------------------------------------------------
info: Gruntfile could not be found.
info: (no grunt tasks will be run.)

Those last two lines seem like they're the problem, but I have no idea how to fix them. Any help would be appreciated.

Upvotes: 3

Views: 614

Answers (3)

Ravi Malviya
Ravi Malviya

Reputation: 121

I was also facing same issue like this, at the end these two lines are showing

info: Gruntfile could not be found.
info: (no grunt tasks will be run.)

Actually it was from grunt, so to remove last to live , i update my .sailsrc file as give below

{
  "hooks": {
    "grunt": false
  }
}

I think this is the right way to disable grunt.

Upvotes: 0

machineghost
machineghost

Reputation: 35725

It turned out this was just a human stupidity issue. For future reference, if you fail to cd in to the newProject directory (or, in my case, you cd in to it then back out to fix a Grunt issue) then you will get:

info: Gruntfile could not be found.
info: (no grunt tasks will be run.)

and a blank page. Solution? cd testProject.

Upvotes: 2

Michael Blankenship
Michael Blankenship

Reputation: 1669

I'm guessing your sails install failed for some reason.

npm uninstall sails
npm cache clear
npm install sails

If that doesn't work go into your app/node_modules/sails directory and then run:

npm install grunt-cli

(In some cases, you might have already had the grunt CLI installed globally and it gets in the way.)

Upvotes: 2

Related Questions