Meterian
Search…
NodeJS
The NodeJS analyser is triggered when in any of the folders of the project is found one among these manifest files:
    1.
    a “package-lock.json”
    2.
    a “packages.json”
    3.
    a “yarn.lock”
In case 1 and 3 the client will trust the contents of the lock file and will collect the dependencies directly from there. In this case, it's important that the information is up to date, otherwise the client will collect stale data that will most probably lead to a wrong analysis: if you are in doubt please re-generate such files.
In case 2 the client will use the local npm tool: it will first execute an “install” command, to make sure that the dependencies are correctly present, and then it will ask npm to generate the dependency tree. For this reason, the project has to build successfully.
In order to avoid the client to look into specific subfolders (by default it won't look into folders named "lib", "examples", "samples" and of course "node_modules), you can add this parameter to the invocation:
1
--flags:npm.folders.excluded=foo,bar,baz
Copied!
In order to avoid the client to look into any subfolder and, instead, search only in the root folder you can add this parameter to the invocation:
1
--flags:npm.root.only=true
Copied!
When using the thin client, the required tools will have to be installed and configured (Npm). This is not required when using the dockerized client.
Last modified 6mo ago
Copy link