This Node instance does not support builds for N-API version 6

Viewed 5573

When I try to run the project, the following message appears:

node-pre-gyp info This Node instance does not support builds for N-API version 6

How can you fix it?

node -v
v12.14.1
npm -v
6.13.4

"@tensorflow/tfjs": "^2.3.0",
"@tensorflow/tfjs-node": "^2.3.0"
1 Answers

Upgrade your version of Node.js.

I just tried this with v12.15.0 and it has the same problem.

I then tried it with v12.18.3 (latest LTS) and it doesn't have the problem.

Note:

  • You might need to delete node_modules and do npm install again once you have installed the latest version of Node.js.

I recommend that you install nvm (node version manager) so that you can easily change between different versions of Node.js.

Related