meeshkan / unmock-js

Fuzz test your REST API calls
https://unmock.io
93 stars 8 forks source link

Replace jestRunner with unmock-jest-runner #388

Closed carolstran closed 4 years ago

carolstran commented 4 years ago

Removed jestRunner.ts from unmock-runner package in exchange for the new unmock-jest-runner package.

Part of #299.

carolstran commented 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

Screen Shot 2020-02-14 at 11 41 23 PM
mikesol commented 4 years ago

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.

ksaaskil commented 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

Screen Shot 2020-02-14 at 11 41 23 PM

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.

ksaaskil commented 4 years ago

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.

carolstran commented 4 years ago

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 😊