Comments (7)
Verified the changes worked on our setup. Thanks for the quick fix @jacobwgillespie!
from action.
Sorry, just saw that #71 is addressing this issue. Will keep this open until it is merged for other users to easily find the issue.
from action.
#71 has merged, this issue may be able to be closed.
from action.
Hi @stramel , @jacobwgillespie I am trying to setup a Github action using changesets
to publish packages from a yarn + lerna
managed mono-repo and I am facing a similar issue. I am not sure what I am doing wrong -
Run changesets/action@master
setting git user
/usr/bin/git config --global user.name "github-actions[bot]"
/usr/bin/git config --global user.email "github-actions[bot]@users.noreply.github.com"
setting GitHub credentials
/usr/bin/git checkout changeset-release/master
error: pathspec 'changeset-release/master' did not match any file(s) known to git
/usr/bin/git checkout -b changeset-release/master
Switched to a new branch 'changeset-release/master'
/usr/bin/git reset --hard 46ea8cef8ca27c82032e2e3659e04eaf5f0c054c
HEAD is now at 46ea8ce Revert changes made to publish workflow
Error: Cannot find module '@changesets/cli/package.json'
Require stack:
- /home/runner/work/aem-cloud-service-source-migration/aem-cloud-service-source-migration/noop.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at p (/home/runner/work/_actions/changesets/action/master/dist/index.js:906:437)
at o (/home/runner/work/_actions/changesets/action/master/dist/index.js:906:546)
at Object.module.exports [as default] (/home/runner/work/_actions/changesets/action/master/dist/index.js:906:574)
at Object.b [as runVersion] (/home/runner/work/_actions/changesets/action/master/dist/index.js:908:3356)
at async /home/runner/work/_actions/changesets/action/master/dist/index.js:910:1597 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/runner/work/aem-cloud-service-source-migration/aem-cloud-service-source-migration/noop.js'
]
}
Error: Cannot find module '@changesets/cli/package.json'
Require stack:
- /home/runner/work/aem-cloud-service-source-migration/aem-cloud-service-source-migration/noop.js
This is my publish action workflow :
name: Publish Packages
on:
push:
branches:
- master
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Setup Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10
- name: Install Dependencies
run: yarn
- name: Execute Tests
run: yarn test
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
with:
publish: yarn changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Any pointers would be immensely helpful.
from action.
Hey @ManasMaji, I took a look at the repo (I believe it's https://github.com/adobe/aem-cloud-service-source-migration) and I think the issue is that you don't have @changesets/cli
installed in the root package.json
.
This Changesets action here uses the locally installed version of @changesets/cli
to perform actions on the repo during the CI workflow, but in your case the package is missing from your devDependencies
here:
Most likely running yarn install -W --dev @changesets/cli
would resolve the error you're seeing.
from action.
Would throwing a custom error in such a case help? 🤔
from action.
Hi @jacobwgillespie , @Andarist Thank you so much for the quick help!! I really appreciate it! 🥇 👍
Indeed adding the @changesets/cli
in the root package.json
's devDependencies
resolved the issue (a very bad oversight on my part).
from action.
Related Issues (20)
- fix: handling `$` in changesets
- Custom Pull request title with tag version HOT 3
- createGithubReleases: true -> body is too long (max is 125000 characters) HOT 3
- Still try to create a new release PR when it already exists a PR HOT 1
- Auto merge / skip the automatic PR process HOT 2
- Gots 404 error on npm when publishing with GitHub Actions HOT 4
- bug: Cannot create GitHub releases HOT 1
- Changesets GithubAction to output the Changeset PR description
- Action
- problem with outputs object HOT 3
- Bbb
- Not able to publish the package to npm. HOT 3
- Allow creating Github Release in Draft
- Crashes HOT 3
- Failing with fatal on git reset. Ability to set target branch?
- Feature request: Link release to pull request
- Upgrade action to use node20
- TypeError: Cannot read properties of null (reading 'author') HOT 1
- Action fails with output of dist/index.js and without error HOT 3
- Automatically Create Betas
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.