Chris Ian Chris Ian - 8 months ago 21
Node.js Question

path has no method 'parse' in Meteor JS

I have tried this code in meteor js but it will display error "TypeError: Object #Object> has no method 'parse'"

path = Npm.require('path')
filename = path.parse('/home/user/dir/file.txt')

but in the documentaion in node js parse method should exisit in path library

Any tips?


The docs default to the current version of node, however meteor typically uses and older version. You can determine which version of node meteor is currently running by looking at the changelog. For v. it's node v0.10.33. You can access the old docs here:

As you can see, the older version of path did not have the parse function. You can also see this via:


If you want to know what version you are using, this post will help you : How can I know the version of node being used by my meteor app?