bug: stencil build causes copyfile error and creates extra directory in monorepo #5486
Open
3 tasks done
Labels
Bug: Validated
This PR or Issue is verified to be a bug within Stencil
Prerequisites
Stencil Version
4.7.0 and higher
Current Behavior
When using
npm stencil build
inside a monorepo package, the build process creates extraneous directories and causes[ ERROR ] EBUSY: resource busy or locked, copyfile
errors.Expected Behavior
npm run build
should not produce extraneous directories. It should not try to copy files outside of the repository.System Info
Steps to Reproduce
Starting within development directory c:\web\apps at the command line:
mkdir bug-report
cd bug-report
npx lerna init
- to create the monorepomkdir packages
- because lerna doesn't create the directory for the individual reposcreate a shared css file to be used by all repos in the monorepo
mkdir testme\assets\css
notepad testme\assets\css\shared.css
- create a basic class and change the font colorcd packages
npm init stencil
- select call the project 'one' and select the 'component' optioncd one
notepad src\components\my-component\my-component.tsx
- edit the component to use the stylesheet you created abovechange the style line to
styleUrls: ['my-component.css', '../../../../../testme/assets/css/shared.css'],
add the class to the div
npm install
- install all of the dependenciesnpm run start
- start your component to confirm that the css class is loaded and changes the color of the div as expectedclose the browser
ctrl+c to kill the server so you are back at the command line
cd c:\web\apps\bug-report\packages
- make sure you are in the package directorydir
- confirm that there is no folder called 'testme' in the packages foldercd one
npm run build
dir ..\
- assuming the build did not give you an error, confirm that it created an extraneous testme folder under packages. This folder is not needed for distribution of the component and can be deleted.The build may also create or attempt to create c:\web\apps\testme.
The build may also produce the copyfile error above.
Code Reproduction URL
https://github.com/rramsey/stencil-bug
Additional Information
The repo does have the bad packages\testme folder in it, which should be deleted before attempting to build just so you can see it come back.
The text was updated successfully, but these errors were encountered: