ionic-team / stencil

A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
https://stenciljs.com
Other
12.59k stars 789 forks source link

EBUSY: resource busy or locked, copyfile #1793

Closed LalitKushwah closed 5 years ago

LalitKushwah commented 5 years ago

Stencil version: 1.1.2



**I'm submitting a:**
<!-- (check one with "x") -->
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

**Current behavior:**
In monorepo when I am using asserts directory in src then getting EBUSY: resource busy or locked, copyfile. 

**Expected behavior:**
It should be build
**Steps to reproduce:**
Create a monorepo in which some components have assets directory in src.

** Action Taken To Resolve**
clean npm/yarn cache
run build with administrator (using windows)
Jason-Abbott commented 5 years ago

I too am having this issue. I made an example repo with details in the README: https://github.com/toba/stencil-win-build

Edit: I upgraded to the latest Node.js (I was already on 12.x) and also stepped backwards through several @stencil/core versions until I got to 1.0.0, all without any change to the error — never could build with assets on Windows 10.

LalitKushwah commented 5 years ago

Hello @Jason-Abbott, I have taken pull the repo you shared. When I created assets folder inside the component created and moved the svg folder inside it then getting no EBUSY error.

LalitKushwah commented 5 years ago

I have resolved the issue created by removing the copy configuration from the stencil.config.ts.

I have copy configuration for coping "assets" folder to the dist and www and by default stencil copies the assets folder without any configuration.

Jason-Abbott commented 5 years ago

Thank you. I didn't realize the assets folder was special beyond being the default.

leonheess commented 2 years ago

Same issue here but for a single file, any ideas?

Node v16.14.2 Stencil 2.12.1 Windows 10