reactjs项目中,去:
npm install
结果警告:
npm WARN [email protected] license should be a valid SPDX license expression
➜ ReactjsTemplate git:(master) ✗ npm install > [email protected] install /Users/crifan/dev/dev_root/crifan/ReactjsTemplate/ReactjsTemplate/node_modules/fsevents > node install [fsevents] Success: “/Users/crifan/dev/dev_root/crifan/ReactjsTemplate/ReactjsTemplate/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node” already installed Pass –update-binary to reinstall or –build-from-source to recompile > [email protected] postinstall /Users/crifan/dev/dev_root/crifan/ReactjsTemplate/ReactjsTemplate/node_modules/uglifyjs-webpack-plugin > node lib/post_install.js npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN [email protected] license should be a valid SPDX license expression |
搜:
should be a valid SPDX license expression
参考:
what SPDX license should I use for private modules? · Issue #8773 · npm/npm
直接设置为:
UNLICENSED
不合适啊。
此处
package.json
中写的是:
“license”: “GNU v3”,
此处希望:
把我本地的LICENSE的GNU v3
写进去
SPDX License List | Software Package Data Exchange (SPDX)
试试:
LicenseRef-LICENSE
结果问题依旧。
貌似是:
GNU General Public License v3.0 only
的:
GPL-3.0
【总结】
改为:
“license”: “GPL-3.0”, |
然后就可以了:
其中:GPL-3.0
对应着:
GNU General Public License v3.0 only
其他的值,详见:
SPDX License List | Software Package Data Exchange (SPDX)
转载请注明:在路上 » 【已解决】ReactJS中npm install警告:npm WARN license should be a valid SPDX license expression