D:\nodejs\node_global>npm install express -g // -g是全局安装的意思
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! D:\nodejs\node_cache\_logs\2023-07-10T07_30_02_765Z-debug-0.log
解决:直接进入对应安装目录输入指令