Closed matthiaskern closed 6 years ago
I've noticed this only after trying npm run tagVersion
failing with that, and trying to do it manually. Seems like np
has problems with scoped packages at the moment. I had similar problems as described in here https://github.com/sindresorhus/np/issues/190
Edit: It's reproducable here https://github.com/matthiaskern/librarian-test
This is interesting, thanks for bringing it up.
I've published a scoped package before to test (it's located here), but I'll give it a go again since it hasn't been done in 3 months
You're right, there seems to be something odd happening with np
, I'll see if I can work around it
I think NPM is the issue, as you first mentioned: https://github.com/npm/npm/issues/18658
I'd say, if you can (for now), roll back to NPM 5.3 and wait for this fix to land and we can revisit it
:+1: Thanks for the help with investigating
Not a problem, I'm a little surprised that NPM has such a bug--but it is just software, so it happens
I'm having an issue with np too and I don't have scoped package. Getting spawnSync np ENOENT
If I install np
globally and run np --yolo --no-yarn
it works so its something with the way angular-librarian is calling np
Are you certain that np
is installed in your local project? Something like an ENOENT
is not the same as the issue here
Yes I am certain it is installed in the local project. It might be the same issue because @matthiaskern says that npm run tagVersion
fails.
@matthiaskern is failing after np
has finished and the build
script has finished running because NPM > 5.3.0 is stripping special characters (in this case the @ symbol)
Ok, I guess I need to open a new issue.
I was hit by two issues, first of all npm run tagVersion
with yarn
failing, it removed dependencies before running the tests, but that's already described in the np
repo. Then when I tried manually I noticed the other issue you found above with npm
itself. npm run tagVersion -- --yolo
might work, but I can't try it out right now.
@matthiaskern I think you should be good with the 1.0.0 release. We needed to move the np
library out of project dependencies to support using it (see the migration guide)
First of all, great project! Thank you for publishing this!
I've noticed that
npm pack
and in the endnpm publish
try to use a path without@
and thus fail. This can be reproduced with a new install and a name like@scope/library
. Renaming the@scope
folder inside/dist
toscope
solves the issue. Could this be an npm issue? All paths insidepackage.json
seem to be correct.package.json