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

Required Node.js version? #25

Closed
molily opened this issue Jan 18, 2016 · 7 comments
Closed

Required Node.js version? #25

molily opened this issue Jan 18, 2016 · 7 comments

Comments

@molily
Copy link

molily commented Jan 18, 2016

I tried to make a build on Node 0.12.2, but the build.js is using ES6 arrow functions. As far as I can see, arrow functions are supported since Node 4.0.0.

Should this dependency at least be noted in the readme? Some people come with Node 0.1x versions, for example because their standard package manager has 0.1x (e.g. Ubuntu).

A way to make it work on old Node versions would be babel-node from babel-cli, AFAIK.

@coryhouse
Copy link
Owner

Great point. I just replaced the arrow func with an anonymous function. Can you please try again and confirm you're good? I did not intend to use ES6 features in the build tools. I want to assure older versions of Node can run this. Thanks for reporting this!

@Guibod
Copy link

Guibod commented Jan 21, 2016

Tested today on ubuntu with nodejs 0.10, it just won't work.
See webpack-contrib/css-loader#144 (comment)

ERROR in ./~/css-loader!./~/sass-loader!./src/styles/styles.scss
Module build failed: ReferenceError: Promise is not defined
    at LazyResult.async (/home/user/dev/webapp/node_modules/css-loader/node_modules/postcss/lib/lazy-result.js:157:31)
    at LazyResult.then (/home/user/dev/webapp/node_modules/css-loader/node_modules/postcss/lib/lazy-result.js:79:21)
    at processCss (/home/user/dev/webapp/node_modules/css-loader/lib/processCss.js:198:5)
    at Object.module.exports (/home/user/dev/webapp/node_modules/css-loader/lib/loader.js:24:2)
 @ ./src/styles/styles.scss 4:14-123 13:2-17:4 14:20-129

@coryhouse
Copy link
Owner

Thanks guys - I'm still trying to determine the minimum Node version this currently supports as is. Do you have a suggestion for an easy way to figure that out?

.10 is quite old as it was released nearly 3 years ago: 2013-03-11. I can add the promise polyfill, but I hate to add another dependency to fix an issue on a 3 year old release. Enlighten me - Is there a good reason to support versions this old? Since this is a framework for new development, wouldn't someone logically want to utilize a recent version of Node as well? Certainly open to a dialog on this.

@Guibod
Copy link

Guibod commented Jan 21, 2016

0.10 is in used in Ubuntu since the very beginning of the package. Next release (Xenial) is jumping to Node 4.2.4 (see http://packages.ubuntu.com/search?keywords=nodejs )

You're on the bleeding edge of software development, you don't have to support back compatibility. It's up to you to define the minimum requirements.

I strongly suggest that you enhance the README with this minimal requirement and point a friendly mean of installing up-to-date NodeJs implementation. For instance https://github.com/nodesource/distributions

Your starter kit is intended for developer audience. You can assume that we are capable of installing a fixed version of node to match the kit.

@coryhouse
Copy link
Owner

Thanks for the advice. Makes sense. So you're saying if I set requirements at 4.2.4, those on Linux should still be able to use this?

@jcpst
Copy link

jcpst commented Jan 21, 2016

The official node site has good information on installing node v4 and v5 on various Linux distros: https://nodejs.org/en/download/package-manager/

Also, anyone doing regular node dev work would likely want a node version manager (like nvm).

@coryhouse
Copy link
Owner

I've noted 4.0.0 as the minimum version in the Readme. Thanks for the input everyone!

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

No branches or pull requests

4 participants