Skip to content

Commit

Permalink
Downgrades package-lock.json for NPM 6.
Browse files Browse the repository at this point in the history
Apparently NPM 7 does not consistently install unsupported optional deps on `npm ci`, which was necessary to workaround this bug: bazel-contrib/rules_nodejs#2395

As a result, we can't really use NPM 7 right now. I also added docs to prefer the Bazel version of NPM and Node to be more consistent about this. Also pinned the relevant versions in `package.json` so users are less likely to make this mistake.
  • Loading branch information
dgp1130 committed Apr 19, 2021
1 parent 61f2fc8 commit b7389b4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2,040 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,19 @@ resource with tools that expect a single file as input, rather than a directory.

## Development

To get started, simply download / fork the repository and run:

```shell
bazel run @nodejs//:npm -- ci
bazel test //...
```

Prefer using `bazel run @nodejs//:npm -- ...` and
`bazel run @nodejs//:node -- ...` over using `npm` and `node` directly so they
are strongly versioned with the repository.

NOTE: If you encounter "Missing inputs" errors from `fsevents` or other optional
dependencies, consider using `npm ci` instead of `npm install`.
dependencies, make sure you are using `npm ci` instead of `npm install`.
See: https://github.com/bazelbuild/rules_nodejs/issues/2395.

There are `bazel` and `ibazel` scripts in `package.json` so you can run any
Expand Down
Loading

0 comments on commit b7389b4

Please sign in to comment.