Check the engines and platform fields in package.\+json\hypertarget{md_sfcode_node_modules_npm_install_checks_README_autotoc_md18403}{}\doxysection{API}\label{md_sfcode_node_modules_npm_install_checks_README_autotoc_md18403}
Both functions will throw an error if the check fails, or return {\ttfamily undefined} if everything is ok.

Errors have a {\ttfamily required} and {\ttfamily current} fields.\hypertarget{md_sfcode_node_modules_npm_install_checks_README_autotoc_md18404}{}\doxysubsection{.\+check\+Engine(pkg, npm\+Ver, node\+Ver, force = false)}\label{md_sfcode_node_modules_npm_install_checks_README_autotoc_md18404}
Check if node/npm version is supported by the package. If it isn\textquotesingle{}t supported, an error is thrown.

{\ttfamily force} argument will override the node version check, but not the npm version check, as this typically would indicate that the current version of npm is unable to install the package properly for some reason.

Error code\+: \textquotesingle{}EBADENGINE\textquotesingle{}\hypertarget{md_sfcode_node_modules_npm_install_checks_README_autotoc_md18405}{}\doxysubsection{.\+check\+Platform(pkg, force)}\label{md_sfcode_node_modules_npm_install_checks_README_autotoc_md18405}
Check if OS/\+Arch is supported by the package.

Error code\+: \textquotesingle{}EBADPLATFORM\textquotesingle{} 