Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local configuration not taking for vars more than #321

Closed
obrienmd opened this issue Apr 13, 2013 · 11 comments
Closed

Local configuration not taking for vars more than #321

obrienmd opened this issue Apr 13, 2013 · 11 comments

Comments

@obrienmd
Copy link

Running sails 0.8.9, local.js doesn't seem to be working for anything deeper than module.exports.[variable].

For instance,

module.exports.port = 80;
Works perfectly, 'sails lift' run sails on port 80.

module.exports.adapters.default = mysql (per config guide linked below)
Results in 'TypeError: Cannot set property 'default' of undefined' when I try to 'sails lift'.

https://github.com/balderdashy/sails/wiki/Guide:-Configuration#localjs

@obrienmd
Copy link
Author

Also, if we hack around it using:

module.exports.adapters = module.exports.adapters || {};
module.exports.adapters.default = 'mysql';

The changes just don't seem to take effect, i.e. they do not overwrite our other configuration files.

@mikermcneil
Copy link
Member

Very weird-- reproduced and looking into it now, thanks!

@mikermcneil
Copy link
Member

@obrienmd This should be good now-- would you mind trying it with the latest master?

npm install sails@git://github.com/balderdashy/sails.git#4a1d423854d17293deb597f34791bd0522dfe772

@obrienmd
Copy link
Author

Hrm, npm install fails, npm cannot find include-all/0.0.6... Looks like 0.0.5 is newest on npm for me?

Note: I am a complete node / npm newbie.

@mikermcneil
Copy link
Member

Ah, try now :)

@particlebanana had asked me to do an npm publish and I'd forgotten until just now.

@obrienmd
Copy link
Author

No go for me, still get the 'TypeError: Cannot set property 'default' of undefined' when I try to set module.exports.adapters.default = 'mysql'.

@mikermcneil
Copy link
Member

Hmm, how about with the latest version?

From the project directory:
npm install sails@git://github.com/balderdashy/sails.git

@obrienmd
Copy link
Author

Same. Perhaps it's something with my config... Can you not repro this?

@mikermcneil
Copy link
Member

Not using the latest-- I definitely saw it before though

On Mon, Apr 15, 2013 at 1:34 PM, obrienmd notifications@github.com wrote:

Same. Perhaps it's something with my config... Can you not repro this?


Reply to this email directly or view it on GitHubhttps://github.com//issues/321#issuecomment-16403141
.

Mike McNeil
Founder
http://www.linkedin.com/in/mikermcneil/ http://twitter.com/mikermcneil
http://github.com/balderdashy

   C      O
  NFI    DEN
  TIA   L i
  nfo  rma
  tion in
   tended
only for t      he addressee(s).

If you are not the intended recipient, empl
oyee or agent responsible for delivery to the
intended recipient(s), please be aware that
any review, dissemination, use,distribut
ion or copying of this message and its
contents is strictly prohibited. If
you receive this email in error, ple
ase notify the sender and destroy any
paper or electronic copies immediately.

@Mantish
Copy link

Mantish commented May 27, 2013

Hi, I'm having the same issue. I just updated to v0.8.9 and it doesn't work.
It only works when I override the whole adapters variable in local.js:

module.exports.adapters = {
    'default': 'mysql',
...

@moremada
Copy link

I'm having the same issue as @Mantish on version v0.8.94. With this issue closed, should we be overriding the entire config option as seen in Mantish's example above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants