Skip to content

Commit

Permalink
build: declare name, version in root package.json #365
Browse files Browse the repository at this point in the history
I'm trying to build node-client on nix using buildNpmPackages, as nix is migrating away from the old way of building node packages, and I get the following:

```
error: builder for '/nix/store/yp8wvva7jzd0z1p6myafvc7h6j2baiax-neovim-node-client-5.1.0.drv' failed with exit code 1;
       last 25 log lines:
       >
       >
       > > @neovim/[email protected] build
       > > tsc --pretty
       >
       >
       > > @neovim/[email protected] build
       > > babel src --out-dir lib
       >
       > Successfully compiled 2 files with Babel (132ms).
       > Finished npmBuildHook
       > Running phase: installPhase
       > Executing npmInstallHook
       > npm ERR! Invalid package, must have name and version
```

This seems to be solved simply by adding the name/version into package.json.
  • Loading branch information
fidgetingbits authored Jun 4, 2024
1 parent 0253672 commit d99ecec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ Only maintainers of the [neovim NPM package](https://www.npmjs.com/package/neovi
2. Update version. Build and publish the package. Tag the release and push.
```bash
# Choose major/minor/patch as needed.
npm version patch
npm version -w packages/neovim/ patch
git commit -m 'release'
# Note: this copies the top-level README.md/CHANGELOG.md to packages/neovim/.
Expand All @@ -231,6 +232,7 @@ Only maintainers of the [neovim NPM package](https://www.npmjs.com/package/neovi
```
3. Post-release tasks:
```bash
npm version --no-git-tag-version prerelease --preid dev
npm version -w packages/neovim/ --no-git-tag-version prerelease --preid dev
git add packages/*/package.json package*.json && git commit -m bump
git push
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "neovim",
"version": "5.1.1-dev.0",
"private": true,
"workspaces": [
"packages/neovim",
Expand Down

0 comments on commit d99ecec

Please sign in to comment.