lucj / sails-oauth2-api

140 stars 34 forks source link

events.js:72 throw er; // Unhandled 'error' event #1

Closed juanpasolano closed 10 years ago

juanpasolano commented 10 years ago

Hi there.
Firstly, thanks for sharing this project. I am very very new to oAuth and API safety and your project has been very helpful to understand this topic.

Secondly, I am getting this error when lifting the app.

$ sails lift

info: Starting app...

trustedTestClient already exists
- client_id: DZGNAB1YDE
- client_secret: tm0PRBZcoLH6UaVWmypc6suXbmK4Ws
- redirectURI: http://localhost:1338
untrustedTestClient already exists
- client_id: G8WCW5J0QJ
- client_secret: Jqy0Kch5dlRht303To4EaAnUFtRrOt
- redirectURI: http://localhost:1339
info:
info:
info:    Sails.js           <|
info:    v0.9.8              |\
info:                       /|.\
info:                      / || \
info:                    ,'  |'  \
info:                 .-'.-==|/_--'
info:                 `--'-------'
info:    __---___--___---___--___---___--___
info:  ____---___--___---___--___---___--___-__
info:
info: Server lifted in `/Users/juansolano/Desktop/sails-oauth2-api`
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press <CTRL> + C at any time.

debug: --------------------------------------------------------
debug: :: Fri Aug 08 2014 18:48:08 GMT-0500 (COT)
debug:
debug: Environment  : development
debug: Port     : 1337
debug: --------------------------------------------------------
debug: Lowering sails...

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: ENOENT, open 'logs/application.log'

As you see there is not much of an stack trace and the event.js files present in the project are part of various npm modules.
These are my specs

$ npm -v
1.3.11
$ node -v
v0.10.21
$ sails -v
0.10.1

As you see my global sails npm is 0.10 and the package.json is using sails v0.9. May be that could affect the lifting?
What am I doing wrong? Do I need to set up somethign before lifting?
Thanks.

lucj commented 10 years ago

Hi, Thanks for the feedback. Sorry my bad, I did not create the logs folder by default. Could you please create one and do a 'sails lift' again ? I haven't tested with sails 0.10 yet but I'll will do it for sure. Luc

juanpasolano commented 10 years ago

Thank you for the fast response. I created the logs folder and is now working smoothly.