Skip to content

declare Node version requirement #20

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

Closed
pocketjoso opened this issue Aug 30, 2015 · 6 comments
Closed

declare Node version requirement #20

pocketjoso opened this issue Aug 30, 2015 · 6 comments
Milestone

Comments

@pocketjoso
Copy link

Hi, thanks for nice library,
I was stuck with the error below for a while before I figured out that my Node version (0.10.38) didn't have the required path.parse method:

var parsed = (0, _path.parse)(pathname);
                               ^
TypeError: undefined is not a function
    at isModule (/Users/jso/criticalcss/node_modules/css-modules-require-hook/dist/index.js:113:32)

Error went away after upgrading to Node 0.12.7.


Perhaps you can declare this requirement a bit more explicitly in README somewhere (or guard and throw clearer error)?

Thanks again for great repo!

@mightyaleksey
Copy link
Member

Hi, thanks :)

I need a fresh version of Node.JS to make it easier to resolve paths for windows. I used engine property in the package.json file, but seems to me npm v2.x doesn't check it.
I'll make it more explicit and put information to the readme.

@mightyaleksey mightyaleksey added this to the upcoming milestone Aug 30, 2015
@nkbt
Copy link
Contributor

nkbt commented Aug 30, 2015

Hi, @sullenor, just use nvm to install multiple node and iojs versions, so you can easily switch between them

@mightyaleksey
Copy link
Member

@nkbt Hi, thanks for the tip. Honestly I need path.sep property, which is different for windows and mac OS. I need it to resolve paths in a correct way. And it is available since 0.12.x version.

@nkbt
Copy link
Contributor

nkbt commented Aug 31, 2015 via email

@mightyaleksey
Copy link
Member

When you work with multiple dependencies - path to the new sources can be absolute, relative or an external module and it becomes challenging to resolve them.

I found out a good way to work with them, but I need to build absolute paths for that, which are relative to the root directory. For that I use path.sep property.

If you know how to solve it without path.sep - please, tell me :)

@mightyaleksey
Copy link
Member

I put it to the readme
1.0.5

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

3 participants