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

document.querySelector error #29

Open
bgbruno opened this issue Apr 11, 2019 · 1 comment
Open

document.querySelector error #29

bgbruno opened this issue Apr 11, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@bgbruno
Copy link

bgbruno commented Apr 11, 2019

Hello - I run

const qselector = require('qselector/dist/cjs');
console.log(qselector.$(body, 'p'));

and I get error

/node_modules/qselector/dist/cjs/index.js:42
    var root = document.querySelector(el || '');
               ^

ReferenceError: document is not defined
    at core (/node_modules/qselector/dist/cjs/index.js:42:16)
    at Object.$ (/node_modules/qselector/dist/cjs/index.js:54:42)
    at Request._callback (/index.njs:85:31)
    at Request.self.callback (/node_modules/request/request.js:185:22)
    at Request.emit (events.js:182:13)
    at Request.<anonymous> (/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:182:13)
    at IncomingMessage.<anonymous> (/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:273:13)
    at IncomingMessage.emit (events.js:187:15)

Q can you help?

Bruno

@lbenie
Copy link
Owner

lbenie commented Apr 15, 2019

@bgbruno
Hi, I have a lot of stuff at work but will try to look at this some time this week!

@lbenie lbenie added the bug Something isn't working label Apr 15, 2019
@lbenie lbenie self-assigned this Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants