Skip to content

Could not find a declaration file for module 'query-selector-shadow-dom/plugins/puppeteer' #57

@Tigrao75

Description

@Tigrao75

Hi @Georgegriff ,
Sorry to bother you, but I'm facing some problems using your plugin. I tried to figure out the problem myself, but I couldn't.
So, I thought to ask for your help:
I used your example for PUPPETEER for shadow-dom and I getting error in the "require":
const { QueryHandler } = require("query-selector-shadow-dom/plugins/puppeteer");

I got this error when I hover the mouse in this line:
"module "C:/Puppeteer/node_modules/query-selector-shadow-dom/plugins/puppeteer/index"
Could not find a declaration file for module 'query-selector-shadow-dom/plugins/puppeteer'. 'C:/Puppeteer/node_modules/query-selector-shadow-dom/plugins/puppeteer/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/query-selector-shadow-dom if it exists or add a new declaration (.d.ts) file containing declare module 'query-selector-shadow-dom/plugins/puppeteer';ts(7016)"

I'm using visual Code. I'm able to see the plugin instaled but even so, I get this annoying error and my query is not woking and I think this error is the problem.

Thank you in advance.
Luciano.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions