Skip to content

Invalid Path Characters Error on yarn dev #69

@MiiKOME

Description

@MiiKOME

Description

I encountered an error when attempting to start the development server using yarn dev. The error message indicates that there are invalid characters in the file path, which prevents the server from starting.

Steps to Reproduce

  1. Clone the repository.
  2. Run yarn install to install dependencies.
  3. Run yarn dev to start the development server.

Expected Behavior

The development server should start successfully and listen on the specified port.

Actual Behavior

The following error occurs:

yarn dev
yarn run v1.22.22
$ run-s clean && vite
$ run-p clean:*
$ rimraf dist
$ rimraf dist-firefox-v2

VITE v4.3.9 ready in 878 ms

➜ Local: http://localhost:3573/
➜ Network: use --host to expose
➜ press h to show help
E:\Cex\browser-extension-react-typescript-starter\node_modules@crxjs\vite-plugin\node_modules\fs-extra\lib\mkdirs\utils.js:16
const error = new Error(Path contains invalid characters: ${pth})
^

Error: Path contains invalid characters: E:/Cex/browser-extension-react-typescript-starter/src/E:\Cex\browser-extension-react-typescript-starter\dist/content
at checkPath (E:\Cex\browser-extension-react-typescript-starter\node_modules@crxjs\vite-plugin\node_modules\fs-extra\lib\mkdirs\utils.js:16:21)
at module.exports.makeDir (E:\Cex\browser-extension-react-typescript-starter\node_modules@crxjs\vite-plugin\node_modules\fs-extra\lib\mkdirs\make-dir.js:12:3)
at Object. (E:\Cex\browser-extension-react-typescript-starter\node_modules\universalify\index.js:22:13)
at E:\Cex\browser-extension-react-typescript-starter\node_modules@crxjs\vite-plugin\node_modules\fs-extra\lib\output-file\index.js:20:11
at E:\Cex\browser-extension-react-typescript-starter\node_modules\universalify\index.js:22:54 {
code: 'EINVAL'
}

Node.js v20.6.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment Information

  • Operating System: Windows 10
  • Node.js Version: v20.6.1
  • Yarn Version: 1.22.22
  • Vite Version: 4.3.9

Additional Information

I have tried running the command prompt with administrator privileges, but the issue persists. It seems that there is a mix of forward slashes (/) and backslashes (\) in the file path, which might be causing the issue.

Any guidance or solutions would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions