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

Fix incorrectly migrated package-lock.json #387

Merged
merged 2 commits into from
Jun 21, 2021

Conversation

Minnozz
Copy link
Contributor

@Minnozz Minnozz commented Jun 12, 2021

node_modules/.bin was missing after a clean npm install

See npm/cli#2147

@ryyppy
Copy link
Member

ryyppy commented Jun 14, 2021

we need to revisit this later, since we currently have a really weird, but working setup on our team's machines that we don't want to touch rn

@Minnozz
Copy link
Contributor Author

Minnozz commented Jun 14, 2021

Could you explain the weird setup?

I think the current package-lock.json is just buggy after being recently upgraded from lockfile v1 to v2 (b1ecde6), causing the rescript and other binaries to be unavailable in npm run scripts unless you had already run an npm install in your checkout before that commit.

@ryyppy
Copy link
Member

ryyppy commented Jun 14, 2021

Right now you are supposed to use node@12 and npm@6 (this was not a typo).

npm@6 uses lockfile v1, which works perfectly fine on all our machines.
We experienced problems with lockfile version 2 though, which ended up so badly that Cheng was literally zipping up node_modules to be able to reproduce his rescript-lang.org setup.

Same for Maxim and Bettina's machine (and partly also mine).

Will have another look at it soon, right now it's too cumbersome to me to communicate yet another tooling version change for everyone.

@Minnozz
Copy link
Contributor Author

Minnozz commented Jun 14, 2021

Right, I understand. Feel free to ignore this / leave this until later, but just to clear up any confusion:

I did not migrate the lockfile to v2 in this PR, that was done a month ago in this commit: b1ecde6. I just updated the README to reflect the lockfile version that is currently in use. If you want to stay on npm@6 it would be better to revert the lockfile in the repo to v1; I could do that if you want?

The team's problems with the v2 lockfile may be the same I encountered (missing binaries)? Both downgrading to v1 or re-upgrading to v2 (this PR) would fix that.

See npm/cli#2147 for explanation of the lockfile bug.

@ryyppy
Copy link
Member

ryyppy commented Jun 21, 2021

Okay now I understand the problem. Will merge this and rebase the currently active branches.

@ryyppy ryyppy merged commit 5959467 into rescript-lang:master Jun 21, 2021
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

Successfully merging this pull request may close these issues.

3 participants