While running the Unified Agent for Prioritize scan for JavaScript projects, there is a validation step of the package.json that is passed to the ‘appPath’ which requires a valid main entry. If the validation fails, you will see the following error message -
[ERROR] - Invalid appPath. The path should point to a package.json file with a valid main entry.
This error implies two possible issues:
-
The package.json file doesn’t contain a valid
mainentry -
The file referred by the
mainentry doesn't exist
To resolve this, please check the following:
-
In the package.json file, make sure there’s a
mainentry defined with a valid file -
Make sure the file exists in the referred location. The example below requires the index.js file saved in the root folder of the project:
{ "name": "my-project", "private": true, "version": "1.1.0", "main": "index.js", ...