Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to supports npm 7. See the changelog [here](https://github.blog/2021-02-02-npm-7-is-now-generally-available/). This fixes an error when running `npm install` with npm 7: ``` Error: ENOTDIR: not a directory, scandir '/gutenberg/node_modules/.package-lock.json' at Object.readdirSync (fs.js:1021:3) at /gutenberg/patches/patch-xcode.js:21:21 at Array.forEach (<anonymous>) at fetchRNPackageDirs (/gutenberg/patches/patch-xcode.js:16:10) at Object.<anonymous> (/gutenberg/patches/patch-xcode.js:37:29) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) { errno: -20, syscall: 'scandir', code: 'ENOTDIR', path: '/gutenberg/node_modules/.package-lock.json' } ``` The error is because, in `patches/patch-xcode`, we were assuming every file in the `node_modules` directory is a directory. Which apparently changes now that it also consists a `.package-lock.json` file. This PR also upgrades the version of the lock file format to version 2, which should also be backward-compatible to npm 6 users.
- Loading branch information