javascript - How to have yarn not issue a warning for the license field? -
on running yarn install
see warning every time there no license filed though have defined one:
$ jq . package.json { "name": "license-example", "version": "1.0.0", "main": "index.js", "license": "unlicensed", "dependencies": { "lodash": "^4.17.4", "moment": "^2.18.1" } }
which according npm defintion should valid:
finally, if not wish grant others right use private or unpublished package under terms:
{ "license": "unlicensed" }
here's output:
yarn install yarn install v0.27.5 warning ../package.json: no license field [1/4] resolving packages... success up-to-date. done in 0.09s.
my main goal warning disappear, yet don't want provide invalid open-source license make warning go way, if internal project never seen on outside.
how mark yarn project propreatary without warning appearing?
yarn , npm default behavior parent directories.
i had outdated , forgotten package.json
in home folder witout license field:
~/package.json
when running yarn install
within project:
~/my-project/package.json
yarn found 1 in home directory , reoported error one. mistook project's package.json
.
the warning makes clear preceding path ..
parent folder.
warning ../package.json: no license field
after removing outdated package.json
expected output:
yarn install v0.27.5 [1/4] resolving packages... success up-to-date. done in 0.88s.
Comments
Post a Comment