.npmrc throws error "Expected a JSON object, array or literal."

116 Views Asked by At

Yarn creates info output like this:


info [email protected]: The platform "darwin" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
[...]

I want yarn to suppress output like that via a .npmrc file adding loglevel=silent.

However, in VSCode I get this message in the Problems tab:

.npmrc
   Expected a JSON object, array or literal.

enter image description here

But as per documentation key/value pairs are a valid way for npmrc configuration: https://docs.npmjs.com/cli/v7/configuring-npm/npmrc

Also, it does not help telling yarn to be silent.

What am I doing wrong here?

0

There are 0 best solutions below