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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Path contains invalid characters. @babel/core and C8 #15784

Open
1 task
evertondanilo opened this issue Jul 14, 2023 · 3 comments 路 May be fixed by #15808
Open
1 task

[Bug]: Path contains invalid characters. @babel/core and C8 #15784

evertondanilo opened this issue Jul 14, 2023 · 3 comments 路 May be fixed by #15808

Comments

@evertondanilo
Copy link

馃捇

  • Would you like to work on a fix?

How are you using Babel?

babel-loader (webpack)

Input code

https://github.com/evertondanilo/cucumber-react-issue

Configuration file name

No response

Configuration

No response

Current and expected behavior

When I run npm run cucumber:coverage I expect to run cucumber tests and get a report generated.
However in the latest version of @babel/core@7.22.9 or any version after @babel/core@7.21.0, I get an error about invalid file path.
The test coverage is generate by the C8 dependency.

I've attached a repo here on how to reproduce the issue:

npm ci
npm run cucumber:coverage
Error: Path contains invalid characters: C:\code\repo\FR.Web.front\frontApp\coverage_cucumber\lcov-report\frontApp\Features\StepDefinitions\C:\code\repo\FR.Web.front\frontApp\Features\StepDefinitions
    at checkPath (C:\code\repo\FR.Web.front\frontApp\node_modules\c8\node_modules\make-dir\index.js:16:18)
    at AsyncFunction.module.exports.sync (C:\code\repo\FR.Web.front\frontApp\node_modules\c8\node_modules\make-dir\index.js:108:2)
    at FileWriter.writeFile (C:\code\repo\FR.Web.front\frontApp\node_modules\c8\node_modules\istanbul-lib-report\lib\file-writer.js:184:16)
    at HtmlReport.onSummary (C:\code\repo\FR.Web.front\frontApp\node_modules\c8\node_modules\istanbul-reports\lib\html\index.js:364:44)
    at LcovReport.<computed> [as onSummary] (C:\code\repo\FR.Web.front\frontApp\node_modules\c8\node_modules\istanbul-reports\lib\lcov\index.js:28:23)
    at Visitor.value (C:\code\repo\FR.Web.front\frontApp\node_modules\c8\node_modules\istanbul-lib-report\lib\tree.js:38:38)
    at ReportNode.visit (C:\code\repo\FR.Web.front\frontApp\node_modules\c8\node_modules\istanbul-lib-report\lib\tree.js:86:21)
    at C:\code\repo\FR.Web.front\frontApp\node_modules\c8\node_modules\istanbul-lib-report\lib\tree.js:92:19
    at Array.forEach (<anonymous>)
    at ReportNode.visit (C:\code\repo\FR.Web.front\frontApp\node_modules\c8\node_modules\istanbul-lib-report\lib\tree.js:91:28)

Version that breaks C8:

npm i @babel/core@7.21.0 --save-dev ,(and any version after that)

Working version with C8:

npm i @babel/core@7.20.12 --save-dev

Environment

  • Babel version(s): @babel/core@7.21.0 ,(and any version after that)
  • Node: 16.15.1
  • npm version: 8.11.0
  • OS: 64-bit (Windows)

Possible solution

No response

Additional context

No response

@babel-bot
Copy link
Collaborator

Hey @evertondanilo! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.

@JLHwung
Copy link
Contributor

JLHwung commented Jul 14, 2023

I can't reproduce this issue on macOS, assuming this is a Windows-only issue. /cc @liuxingbaoyu if you can take a look.

@evertondanilo
Copy link
Author

I can't reproduce in Linux as well. @JLHwung I believe your theory is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants