Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Yarn build error (ENONENT ERROR) #13204

Closed
wants to merge 1 commit into from
Closed

Fix: Yarn build error (ENONENT ERROR) #13204

wants to merge 1 commit into from

Conversation

Biki-das
Copy link
Contributor

@Biki-das Biki-das commented Sep 1, 2022

Whiled doing yarn build in the repo, I found this error , seems like it is specific to Windows
Windows PowerShell 9_1_2022 11_26_34 AM

clearing the dist later fixed this issue as you can see below
Windows PowerShell 9_1_2022 11_47_57 AM

@@ -167,7 +167,7 @@ const excludedPackages = new Set(['@jest/globals']);
let definitionFile = await fs.promises.readFile(filepath, 'utf8');

rimraf.sync(path.resolve(packageDir, 'build/**/*.d.ts'));
fs.rmSync(path.resolve(packageDir, 'dist/'), {
fs.rmSync(path.resolve(packageDir, 'dist/**'), {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't seem right - rmSync doesn't support globs, so it would just not do anything. It's some other read that fails.

I'll try to dig up a windows computer and reproduce

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately the only windows machine I have access to is Windows 7, and the latest version of Node it's possible to install on it is v12 (which doesn't have fs.rm API), so I'm unable to debug this 😅

@G-Rath you wouldn't have som spare time to at this, would you? 😀

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I can probably have a look tomorrow

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet, thanks!

@G-Rath
Copy link
Contributor

G-Rath commented Sep 2, 2022

@Biki-das I'm not able to reproduce this locally using v16:

image

Can you give more details on what versions you're on and what you're actually doing?

@weidehai
Copy link
Contributor

@SimenB @Biki-das
I raised this question before #12796 . I used the same method as you #12797 . After analysis, I found that it was the difference between posix system and Windows system. I modified the code to make it compatible with both,see #13270

@G-Rath
Copy link
Contributor

G-Rath commented Sep 16, 2022

@SimenB I've reproduced the error and confirmed that @weidehai's PR resolves it - have left a comment on their PR.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants