Thanks for reaching out. The error indicates that PNPM Is unable to locate a manifest file(package.JSON , package.yaml, or package.json5) in the directory where the command is being executed. PNPM requires one of these files to understand the project's dependencies and scripts.
Steps to resolve
1. check for the package.json file
· Navigate to your project folder and confirm if a package.json file exists.
· Example:
Cd C:\Users\<Username>\Project\SCL2.0.Mepla.Simple\automated-tests dir package.json
· If not found, navigate to the folder that actually contains your package.json (for example the project root).
2. Run the command from the correct directory
· Ensure you are running the command in the same folder that contains your package.json
Cd C:\Users\<Username>\Project\SCL2.0.Mepla.Simple pnpm run test
3. if package.json is missing
· You can recreate it using:
Pnpm init
· This will guide you to create a new manifest file for your project.
4. Check workspace setup(if using monorepo)
· If your project uses PNPM workspaces ensure that
i. you have a pnpm-workspace.yaml at the root.
ii. The package filled in it correctly includes your subfolder(e.g., automated-tests)
· Example:
Packages:
- ‘automated-tests/*’
5. Reinstall dependencies
· After consuming the correct folder and manifest:
Pnpn install
Pnpm run test
Additional References
If the issue persists after these steps, please share:
· The folder structure of your project
· The output of pnpm list
· The location of your packagejso and pnpm-workspace.yaml files.
Please let us know if you require any further assistance we’re happy to help. If you found this information useful, kindly mark this as "Accept Answer".