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

TypeError: Cannot read property 'R_OK' of undefined #52

Closed
ondrej-fabry opened this issue Jun 25, 2018 · 1 comment · Fixed by #53
Closed

TypeError: Cannot read property 'R_OK' of undefined #52

ondrej-fabry opened this issue Jun 25, 2018 · 1 comment · Fixed by #53

Comments

@ondrej-fabry
Copy link
Contributor

ondrej-fabry commented Jun 25, 2018

I'm running into this error when using simple config file:

/usr/local/lib/node_modules/markdown-link-check/markdown-link-check:60
        fs.access(program.config, fs.constants.R_OK, function (err) {
                                              ^

TypeError: Cannot read property 'R_OK' of undefined
    at ReadStream.<anonymous> (/usr/local/lib/node_modules/markdown-link-check/markdown-link-check:60:47)
    at emitNone (events.js:72:20)
    at ReadStream.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:905:12)
    at nextTickCallbackWith2Args (node.js:441:9)
    at process._tickCallback (node.js:355:17)

Config:

{
    "ignorePatterns": [
        {
            "pattern": "^http"
        }
    ]
}

I'm running latest version: 3.6.2 with node 4.6.2 on Ubuntu 16.04

EDIT:

I think I found the reason why.. it seems that fs.constants was deprecated: nodejs/node#8044 and people use following code for compatibility: (fs.constants || fs).X_OK

ondrej-fabry added a commit to ondrej-fabry/markdown-link-check that referenced this issue Jun 25, 2018
@ondrej-fabry
Copy link
Contributor Author

@tcort Any blocker on this?

@tcort tcort closed this as completed in #53 Jul 26, 2018
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

Successfully merging a pull request may close this issue.

1 participant