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

Problem with generator and less #6

Closed
daver182 opened this issue Mar 4, 2014 · 9 comments
Closed

Problem with generator and less #6

daver182 opened this issue Mar 4, 2014 · 9 comments
Labels

Comments

@daver182
Copy link

daver182 commented Mar 4, 2014

Hi, I have found a problem when I run the Express command with the --css less option, in the app.js:

app.use(require('less-middleware')({ src: path.join(__dirname, 'public') }));

It should be (options is an object):

app.use(require('less-middleware')(path.join(__dirname, 'public'), {options}));

Because the middleware take the first parameter as the source, and the second as the object with the options. I know because I got an error with path.js, and it was because the source wasn't a string.

@jonathanong
Copy link
Member

@daver182
Copy link
Author

daver182 commented Mar 4, 2014

Yes but in the new version, 2.0 in beta state, the constructor it will change, and that problem will happen because with npm install, you get the 2.0 version not the 0.1. So it will fail eventually.

@defunctzombie
Copy link
Contributor

In the new generator code I am pinning module versions to avoid this. It will not be a problem going forward.

@jonathanong
Copy link
Member

wait i don't see any pending changes for v2. we should pin it to 1.x.x anyways.

@daver182
Copy link
Author

daver182 commented Mar 4, 2014

Im talking about version 0.2.0-beta, https://github.com/emberfeather/less.js-middleware/blob/rewrite/readme.md

@jonathanong
Copy link
Member

that's not even out yet, so i'm not sure what the problem is. changing it now would break new apps.

once it's out, we can update the API and pin to 0.2.0.

@defunctzombie
Copy link
Contributor

I think the issue is that they published it to npm as the latest tag and the old generator had * as the dependency version and thus it now breaks for people trying to use it.

@jonathanong
Copy link
Member

ah ok. we just need a release then

@defunctzombie
Copy link
Contributor

Latest express-generator package fixes this by pinning the version better

@dougwilson dougwilson added the bug label Jan 4, 2015
@expressjs expressjs locked and limited conversation to collaborators Jan 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants