cursor初步使用-vue3

@

概要

简单记录下最近使用cursor使用的经验总结

结合各种大模型来写代码的编辑器

推荐claude3.7

使用花生插件

这个插件是用来可以方便快捷的创建针对不同语言的rules

对话

ctrl+i呼出对话框,然后通过对话让其生成项目代码

新建了个vue3项目,已经帮我创建好了,然后我运行npm i报错如下


> npm i
npm error code EPERM
npm error syscall mkdir
npm error path C:\Program Files\nodejs\node_cache\_cacache\index-v5\3e\1b
npm error errno -4048
npm error Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_cache\_cacache\index-v5\3e\1b'
npm error     at async mkdir (node:internal/fs/promises:858:10)
npm error     at async Object.insert (D:\Scoop\persist\nvm\nodejs\v20.15.0\node_modules\npm\node_modules\cacache\lib\entry-index.js:122:5)
npm error     at async CacheEntry.store (D:\Scoop\persist\nvm\nodejs\v20.15.0\node_modules\npm\node_modules\make-fetch-happen\lib\cache\entry.js:308:7)
npm error     at async fetch (D:\Scoop\persist\nvm\nodejs\v20.15.0\node_modules\npm\node_modules\make-fetch-happen\lib\fetch.js:98:7)
npm error     at async RegistryFetcher.packument (D:\Scoop\persist\nvm\nodejs\v20.15.0\node_modules\npm\node_modules\pacote\lib\registry.js:91:19)
npm error     at async RegistryFetcher.manifest (D:\Scoop\persist\nvm\nodejs\v20.15.0\node_modules\npm\node_modules\pacote\lib\registry.js:129:23)
npm error     at async #nodeFromEdge (D:\Scoop\persist\nvm\nodejs\v20.15.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1055:19)
npm error     at async #buildDepStep (D:\Scoop\persist\nvm\nodejs\v20.15.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:923:11)
npm error     at async Arborist.buildIdealTree (D:\Scoop\persist\nvm\nodejs\v20.15.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:203:7)
npm error     at async Promise.all (index 1) {
npm error   errno: -4048,
npm error   code: 'EPERM',
npm error   syscall: 'mkdir',
npm error   path: 'C:\\Program Files\\nodejs\\node_cache\\_cacache\\index-v5\\3e\\1b',
npm error   requiredBy: '.'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It's possible that the file was already in use (by a text editor or antivirus),
npm error or that you lack permissions to access it.
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.

npm error Log files were not written due to an error writing to the directory: C:\Program Files\nodejs\node_cache\_logs
npm error You can rerun the command with `--loglevel=verbose` to see the logs in your terminal

大概意思是没有权限在这个C:\Program Files\nodejs\node_cache\_cacache\index-v5\3e\1b路径下创建文件,然后我win+r,然后输入cmd,然后ctrl+shift+回车,再进入文件夹,最后再执行npm i成功

小结

就是简单使用现在流行的ide方式生成代码,以后还会越用越多

posted @ 2025-04-30 11:51  蜗牛使劲冲  阅读(602)  评论(0)    收藏  举报