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

ERROR: Could not resolve module javascript. #4280

Open
majidmc2 opened this issue Sep 16, 2020 · 1 comment
Open

ERROR: Could not resolve module javascript. #4280

majidmc2 opened this issue Sep 16, 2020 · 1 comment
Labels
JS question Further information is requested

Comments

@majidmc2
Copy link

Hi, I used this command to analyze databases with the CodeQL CLI:
$../codeql/codeql database analyze test-db ql.ql --format=csv --output=js-analysis.csv

but I got this error:
Running queries. Compiling query plan for /home/test/Desktop/Ch51/ql.ql.
ERROR: Could not resolve module javascript. There should probably be a qlpack.yml file declaring dependencies in /home/test/Desktop/Ch51 or an enclosing directory. (/home/test/Desktop/Ch51/ql.ql:2,8-18)
ERROR: Could not resolve type SimpleParameter (/home/test/Desktop/Ch51/ql.ql:4,6-21)

What is the problem?

@majidmc2 majidmc2 added the question Further information is requested label Sep 16, 2020
@sidshank sidshank added the JS label Oct 19, 2023
@aibaars
Copy link
Contributor

aibaars commented Oct 30, 2023

Most likely the ql.ql file is defined outside of a "query pack". One of the parent folders should contain a qlpack.yml file that defines the dependencies of the query. In this case the query should depend codeql/javascript-all which contains the javascript module. You can run codeql pack init to initialize a "query pack" folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JS question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants