JavaScript Proritize Scan - How To Solve "Invalid appPath" Error
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
main
entryThe file referred by the
main
entry doesn't exist
To resolve this, please check the following:
In the package.json file, make sure there’s a
main
entry defined with a valid fileMake sure the file exists in the referred location. The example below requires the index.js file saved in the root folder of the project:
CODE{ "name": "my-project", "private": true, "version": "1.1.0", "main": "index.js", ...