Error: enoent: no such file or directory

Recently, using cnpm to install spritejs, I have been reporting this error all the time. I checked a lot on the Internet and found no problem.

Finally, try again and again. After setting cnpm again, it’s OK.

npm install -g cnpm --registry=https://registry.npm.taobao.org

After executing this, you will be prompted that many files have been updated. Just install spritejs again.

This shows that the previous version of cnpm may be too old, so there is a problem.

Read More: