Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Unable to parse package.json #32

Closed
softmarshmallow opened this issue Feb 6, 2021 · 1 comment
Closed

TypeError: Unable to parse package.json #32

softmarshmallow opened this issue Feb 6, 2021 · 1 comment

Comments

@softmarshmallow
Copy link

Run JS-DevTools/npm-publish@v1
  with:
    token: ***
    check-version: true
    registry: https://registry.npmjs.org/
    package: package.json
    tag: latest
    dry-run: false
Error: TypeError: Unable to parse package.json 
Invalid Version: 0.0.2rc
    at Object.readManifest (/home/runner/work/_actions/JS-DevTools/npm-publish/v1/src/read-manifest.ts:47:11)
    at Object.npmPublish (/home/runner/work/_actions/JS-DevTools/npm-publish/v1/src/npm-publish.ts:15:18)
    at main (/home/runner/work/_actions/JS-DevTools/npm-publish/v1/src/action/index.ts:28:19)

TypeError: Invalid Version: 0.0.2rc
    at new SemVer (/home/runner/work/_actions/JS-DevTools/npm-publish/v1/dist/node_modules/semver/classes/semver.js:38:13)
    at Object.readManifest (/home/runner/work/_actions/JS-DevTools/npm-publish/v1/src/read-manifest.ts:40:16)
    at Object.npmPublish (/home/runner/work/_actions/JS-DevTools/npm-publish/v1/src/npm-publish.ts:15:18)
    at main (/home/runner/work/_actions/JS-DevTools/npm-publish/v1/src/action/index.ts:28:19)

Is this happening because the version already exists on npm? or... because actually invalud version name?

0.0.1rc2 kind of name is acceptable by npm. and it works via npm / yarn publish cli. if this is the reason. i believe this needs to be fixed.

@ruscon
Copy link

ruscon commented Mar 13, 2021

TypeError: Invalid Version: 0.0.2rc

valid version is 0.0.2-rc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants