When installing "node-addon-api" with yarn2 it outputs a warning:
yarn add -D node-addon-api
➤ YN0000: ┌ Resolution step
➤ YN0032: │ node-addon-api@npm:2.0.0: Implicit dependencies on node-gyp are discouraged
➤ YN0000: └ Completed in 1.11s
yarn2 does not use globally installed node-gyp. Solution will probably be to include a peerDependency for node-gyp.
You can add node-gyp to your project's dev dependencies. Since node-addon-api can be used with node-gyp either cmake or cmake.js, it doesn't make sense for node-addon-api to add node-gyp as peer dependencies.
@jeffrson does that answer your question and can we close this out?
Adding node-gyp to my own devDependencies does not prevent the warning.
IMO, as yarn2 is concerned, the peerDependency should be declared. You may mark it as optional by peerDependenciesMeta
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.
Most helpful comment
You can add node-gyp to your project's dev dependencies. Since node-addon-api can be used with node-gyp either cmake or cmake.js, it doesn't make sense for node-addon-api to add node-gyp as peer dependencies.