"Error: Error: Failed to load the 'package.json' file, did you setup your project correctly?"
See original GitHub issueBug Report
Current behavior
Running action in GitHub, get error that can’t load package.json.
Expected behavior
Package.json is loaded
Others: Action:
on:
pull_request:
branches: [develop]
jobs:
lint_and_build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Directory change
run: |
cd <nx_directory>
- name: Nrwl Nx
uses: MansaGroup/nrwl-nx-action@v2.0.3
with:
targets: lint, build
Output:
Run MansaGroup/nrwl-nx-action@v2.0.3 🔍 Ensuring Nx is available Error: Error: Failed to load the ‘package.json’ file, did you setup your project correctly?
I put a pwd and ls in the Directory Change step to ensure I was in the right place, the output included the proper package.json file.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
In VS Code, I'm getting this error, 'Failed to load module ...
It seems like some path is broken on my machine or something is missing. We have a package.json with a script to run...
Read more >Solved: CLD200 - Manual Deployment keeps erroring out
Solved: I am going through the CLD200 documentation stepwise and building the sample application. It has been working properly, until I get to...
Read more >Configuring your application's dependencies - AWS Elastic ...
When your application runs, Node.js loads the modules from this directory. ... You can specify these module dependencies using a package.json file.
Read more >package.json - npm Docs
This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a...
Read more >Error Codes | Yarn - Package Manager
The author of packageA can fix this problem by adding a peer dependency on packagePeer . If relevant, they can use optional peer...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ll create a new release then! Thanks for pointing out!
Thanks for the quick reply! That makes sense. So it seems like I’ll have to do my
npm ciin each job too, which at that point, it seems best to just have everything together in one job.