element-plus / element-plus-vite-starter

🌰 A starter kit for Element Plus with Vite
https://vite-starter.element-plus.org
1.13k stars 370 forks source link

Error #32

Closed helloNN closed 2 years ago

helloNN commented 2 years ago

new dependencies found: elemtn-plus/es,element-plus/es/components/menu/style/index, ...., updating... Failed to write to output file: open C:\Users\nn\Desktop\element-plus-vite-starter\node_modules.vite\element-plus.js:Access is denied.

sxzz commented 2 years ago

Try to run as administrator.

helloNN commented 2 years ago

It does't work too.

------------------ 原始邮件 ------------------ 发件人: "element-plus/element-plus-vite-starter" @.>; 发送时间: 2022年3月10日(星期四) 下午5:31 @.>; @.**@.>; 主题: Re: [element-plus/element-plus-vite-starter] Error (Issue #32)

Try to run as administrator.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

sxzz commented 2 years ago

https://github.com/element-plus/element-plus/issues/5842

YunYouJun commented 2 years ago

This is a bug in vite 2.7(Probably). Just delete the node_modules and upgrade vite/element-plus the version.

YunYouJun commented 2 years ago

If you still have questions, you can continue to leave a message here. I'll reopen the issue.

Godkillme commented 2 years ago

I still have the question as below with latest vite&element-plus version and other dependencies.

[vite] new dependencies found: @element-plus/icons-vue, updating...
X [ERROR] Failed to write to output file: open C:\Users\ohGod\Documents\eleProject\node_modules\.vite\element-plus.js: Access is denied.
上午11:23:11 [vite] error while updating dependencies:
Error: Build failed with 1 error:
error: Failed to write to output file: open C:\Users\ohGod\Documents\eleProject\node_modules\.vite\element-plus.js: Access is denied.

I have tried all the ways mentioned, such as delete the node_modules, run as administrator, but it does't work at all. Please please save the child.

YunYouJun commented 2 years ago

Can your provide a minimal example? @Godkillme

CalmHarbin commented 2 years ago

I also encountered this problem. How should I solve it in the end

YunYouJun commented 2 years ago

In fact, I can't reproduce it.

Does anyone have a minimal example?

CalmHarbin commented 2 years ago

You can try this.

https://github.com/CalmHarbin/test

YunYouJun commented 2 years ago

You can try this.

https://github.com/CalmHarbin/test

In fact, it works well...

image

image

I'm in macOS.

Try clearing the node_modules cache. Or I think this is a permission adaptation problem of vite in Windows, not a problem with this template.

CalmHarbin commented 2 years ago

thank you, but can you delete my project name from the picture

YunYouJun commented 2 years ago

thank you, but can you delete my project name from the picture

I updated it. 🤣

CalmHarbin commented 2 years ago

I upgraded my nodejs version with nvm and successfully solved it.

nodejs: 14.17.0 -> 16.14.2

https://github.com/nuxt/vite/issues/207

helloNN commented 2 years ago

try more until it work.

---Original--- From: @.> Date: Tue, Mar 15, 2022 11:37 AM To: @.>; Cc: @.**@.>; Subject: Re: [element-plus/element-plus-vite-starter] Error (Issue #32)

I still have the question as below with latest vite&element-plus version and other dependencies. [vite] new dependencies found: @element-plus/icons-vue, updating... X [ERROR] Failed to write to output file: open C:\Users\ohGod\Documents\eleProject\node_modules.vite\element-plus.js: Access is denied. 上午11:23:11 [vite] error while updating dependencies: Error: Build failed with 1 error: error: Failed to write to output file: open C:\Users\ohGod\Documents\eleProject\node_modules.vite\element-plus.js: Access is denied.
I have tried all the ways mentioned, such as delete the node_modules, run as administrator, but it does't work at all. Please please save the child.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

helloNN commented 2 years ago

Delete node-modules,use npm to install.Try more.

---Original--- From: @.> Date: Tue, Mar 22, 2022 14:12 PM To: @.>; Cc: @.**@.>; Subject: Re: [element-plus/element-plus-vite-starter] Error (Issue #32)

I also encountered this problem. How should I solve it in the end

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>