'How do I fix the issue : npm ERR! code ENOTCACHED

My BSP is Yocto Project 3.4 (Honister).

Nodejs is v16.11.1, and npm is v8.0.0.

I refer Yocto Project Development Tasks Manual 3.22.7. Creating Node Package Manager (NPM) Packages, but when I "devtool build cute-files", I meet errors.

At first, the mime can't find some modules, so I add them from git. But now the yocto report an error :

npm ERR! code ENOTCACHED

npm ERR! request to https://registry.npmjs.org/commander failed: cache mode is 'only-if-cached' but no cached response is available.

I google about ENOTCACHED, but I couldn't find any useful information.

Would you tell how to fix it?

Thanks a lot.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source