Closed carolstran closed 4 years ago
So I added unmock-jest-runner
to the root level but when I try to uninstall it from unmock-node
and unmock-runner
, I get a variation of this error and I'm not sure how to resolve it... 🤔 Have either of you seen something like this before? @ksaaskil @mikesol
It looks like something in the background has done chmod
on the openapi-refinements
directory. I find that the best way to resolve this is to nuke the repo and clone anew, as otherwise you'll need to do chmod
calls by hand on directories, which can get dicey.
So I added
unmock-jest-runner
to the root level but when I try to uninstall it fromunmock-node
andunmock-runner
, I get a variation of this error and I'm not sure how to resolve it... 🤔 Have either of you seen something like this before? @ksaaskil @mikesol
Lerna is tricky: you're not supposed to do npm install
or npm uninstall
inside packages as it will mess up how Lerna works. The way to add a dependency to a single package is either npx lerna add my-package --scope=unmock-node
or adding the dependency by hand in the package's package.json
and doing fresh install. If you want to remove a dependency, you need to delete it by hand from package.json
and do a fresh install so that package-lock.json
updates. I usually do rm -rf node_modules && npm run clean && npm install
for a full fresh install.
Hmm, I see there are now multiple package-lock.json
files inside packages, those probably originate from how you've run npm install
inside packages. We've never done that (except when learning Lerna ;)) as it seems to break things. I'm not sure what's the correct way to add package-lock.json in packages in Lerna but I'd consider deleting those for now.
What a mess ahhhhhh 🙈 But thank you both for your comments! Really appreciate it as this is my first time working with a Lerna project. I'll tackle this tomorrow 😊
Removed
jestRunner.ts
fromunmock-runner
package in exchange for the newunmock-jest-runner
package.Part of #299.