Comments (10)
I found a solution by adding version: 7
- uses: pnpm/action-setup@v2
with:
version: 7
run_install: |
- cwd: client
However I do think this should be changed in a future version to use the more common syntax working-directory
from the defaults
like @andresgutgon showed above
from action-setup.
Yes, in your job:
jobs:
your_job:
name: Your job name
runs-on: ubuntu-latest
defaults:
run:
working-directory: client
In my case my javascript is in code/client
folder
from action-setup.
For future reference, you can pin any version and it will work.
Originally I thought you specifically had to pin verison 7.15.0
, but any version will do.
@andresgutgon thanks for the tips!
from action-setup.
Ok I found what was my issue.
This line is looking always in the root of the repo:
action-setup/src/install-pnpm/run.ts
Line 47 in 11dd14d
The solution was to use version
param:
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 7.15.0
So this way this action doesn't try to find a package.json
in root of the repo.
I hope this can help someone : )
from action-setup.
Is there a fix without pinning the version to 7.x.x?
from action-setup.
Mine is not a fix pinning to any specific version. In version
you can put whatever:
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: PUT_YOUR_VERSION
Anyway I was having this problem because I had defined packageManager
in my root package.json
. Another solution would be not define packageManager
attribute in your package.json
so you don't need the with
config in the action.
from action-setup.
Doesn't this mean that it pins the version...?!
https://github.com/pnpm/action-setup#version
Sorry if I'm being dumb.
from action-setup.
I guess if you put a version there that's the version used by the github action. So yes, that would be pinned.
But I think anyway is a good practice to pin your project to an specific pnpm
version. Either by setting packageManager
in your root package.json
or by setting it in the github action.
Anyway what's your problem? Mine was because I had the js monorepo inside a folder of my git repo.
from action-setup.
Okay, gotcha, thanks!
I'm working with a similar setup, do you just add working-directory: foo
whenever you run a command or is there a way to take care of that generally?
from action-setup.
@andresgutgon @robotkutya I'm facing a similar issue, I've read through the docs and I saw run_install.cwd
should configure this but I haven't gotten it to work. Does anyone have a working example that we could add to the docs?
Here's a code snippet of what I would expect work based on the docs:
- uses: pnpm/action-setup@v2
with:
run_install: |
- cwd: client
from action-setup.
Related Issues (20)
- Build script fails with "Cannot augment module '_' with value exports because it resolves to a non-module entity."
- Duplicate message in error: in the package.json with the key "packageManager" HOT 1
- How does this compare to `run: corepack enable`? HOT 10
- `dest` not working HOT 1
- Could not read from remote repository due to renamed organization
- ENOENT: no such file or directory during self-install HOT 6
- Add support for `volta.pnpm` field HOT 1
- Update to Node.js v20 HOT 1
- should upgrade node16 to node20 HOT 1
- The action breaks the container environment in the openSUSE HOT 1
- Permission denied errors with github repo references in transitive deps HOT 1
- Add support for grabbing `version` from the `engines.pnpm` field HOT 2
- How to cache pnpm ? HOT 1
- README references old versions of pnpm
- Installing pnpm when the package.json isn't in the root directory HOT 3
- Enable Code Scanning & Address Code Quality Issues HOT 4
- `v2` not up to date HOT 5
- Invalid
- EACCES: permission denied when running in a container w/ non-default user
- node20 support HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-setup.