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

Error in publishing lib as an npm package #7

Open
peoray opened this issue Oct 5, 2023 · 2 comments
Open

Error in publishing lib as an npm package #7

peoray opened this issue Oct 5, 2023 · 2 comments

Comments

@peoray
Copy link

peoray commented Oct 5, 2023

Hi @LinusBorg, thanks for the library.

I'm trying to publish the lib folder as an npm directory.

what I did was to cd into the /packages/lib folder and then run npm publish from there. I got this error:
npm ERR! Cannot set properties of null (setting 'peer')

What could be the issue? I have reinstalled node_modules but that didn't help

@LinusBorg
Copy link
Owner

I haven't come across that error before, don't really have an idea what could be causing it. My first instinct would be to check that your versions of node, npm etc are uptodate. also consider that this repo runs on pnpm, so if you also use pnpm to manage your repo, try using pnpm publish (which should also work from the project root).

@epreston
Copy link
Contributor

Hi guys, couple of ideas:

  • If this is a public package and you don't pay an npm subscription, the first time you publish a package you need to run npm publish --access public
  • if you are publishing a scoped package @scope/package you need to be an admin of that "scope". Your user account or a company account you have made will give you a scope name. Check that you own it and have access.

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

3 participants