-
Notifications
You must be signed in to change notification settings - Fork 524
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
Build fails when including paralleljs #1448
Comments
That package.json is interesting! It starts with three strange bytes before the opening curly brace.
utf-8 but I dunno what that garbage is. The real question is just, are we parsing the package.json in a way we shouldn't.? let's see in node:
I guess we could fix this bug by using require() instead. Maybe @clydin has some opinion on that |
Ah, I'm learning. These three bites are The UTF-8 representation of the BOM is the (hexadecimal) byte sequence 0xEF,0xBB,0xBF. Looks easy to strip. |
A BOM is considered white space so doing a
|
Yes. It’s the UTF8 BOM. Windows systems have a tendency to add it to files and can be safely stripped. Trim is a viable option here as leading and trailing whitespace is not significant for a JSON file. |
🐞 bug report
Affected Rule
The issue is caused by the rule:yarn_install/npm_install
Is this a regression?
Unsure
Description
After including paralleljs the
bazel build //...
fails due to an invalid package.json format. The package.json format does not look to be out of the ordinary and can be processed by other tools likejq
https://github.com/parallel-js/parallel.js/blob/master/package.json
🔬 Minimal Reproduction
Using the example/nestjs
Do
yarn add paralleljs
thenbazel build. //...
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules version (SHA):
Anything else relevant?
The text was updated successfully, but these errors were encountered: