在终端运行npm install -–save-dev css-loader时的错误

学习webpack打包工具时下载css-loader出现如下错误:

npm WARN saveError EPERM: operation not permitted, rename 'D:\briup\12_vue生态\day01\test\package.json.1934995540' -> 'D:\briup\12_vue生态\day01\test\package.json'

翻译出来:
npm警告saveError EPERM:操作不允许重命名“D: \ briup \ 12 _vue生态\ day01 \ \ package.json测试。1934995540”- >“D: \ briup \ 12 _vue生态\ day01 \ \ package.json测试

然后我就把package.json文件移出项目,重新运行下载命令npm install -–save-dev css-loader,结果又说

npm WARN saveError ENOENT: no such file or directory, open 'D:\briup\12_vue生态\day01\test\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'D:\briup\12_vue生态\day01\test\package.json'

翻译就是:
npm警告saveError ENOENT:没有这样的文件或目录,打开“D: \ briup \ 12 _vue生态测试\ \ day01 \ package.json”
npm警告enoent enoent:没有这样的文件或目录,打开“D: \ briup \ 12 _vue生态测试\ \ day01 \ package.json”

然后我又把package.json文件移进项目文件夹里面来,再次运行npm install -–save-dev css-loader命令,发现就好了,真是个磨人的小妖精

记录一下

你可能感兴趣的:(在终端运行npm install -–save-dev css-loader时的错误)