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

File path not recognized when executing 'yarn dev' #4701

Closed
7 tasks done
callqh opened this issue Aug 24, 2021 · 1 comment · Fixed by #4703
Closed
7 tasks done

File path not recognized when executing 'yarn dev' #4701

callqh opened this issue Aug 24, 2021 · 1 comment · Fixed by #4703
Labels
duplicate This issue or pull request already exists pending triage

Comments

@callqh
Copy link

callqh commented Aug 24, 2021

Describe the bug

I introduced a third-party library called 'event-emitter' into my project and it threw an error when executing 'yarn dev' that the contents of the file could not be read
image

Reproduction

https://github.com/liuqh0609/vite-test

System Info

System:
    OS: macOS 11.5.2
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 137.72 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.2 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.13 - /usr/local/bin/npm
    Watchman: 2021.06.07.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 92.0.4515.159
    Safari: 14.1.2

Used Package Manager

yarn

Logs

> node_modules/d/index.js:7:30: error: Could not read from file: /Users/xxx/61/vite-project/node_modules/es5-ext/string/index.js#/contains
    7 │   , contains        = require("es5-ext/string/#/contains");~~~~~~~~~~~~~~~~~~~~~~~~~~~

error when starting dev server:
Error: Build failed with 1 error:
node_modules/d/index.js:7:30: error: Could not read from file: /Users/xxx/61/vite-project/node_modules/es5-ext/string/index.js#/contains
    at failureErrorWithLog (/Users/xxx/61/vite-project/node_modules/esbuild/lib/main.js:1449:15)
    at /Users/xxx/61/vite-project/node_modules/esbuild/lib/main.js:1131:28
    at runOnEndCallbacks (/Users/xxx/61/vite-project/node_modules/esbuild/lib/main.js:921:63)
    at buildResponseToResult (/Users/xxx/61/vite-project/node_modules/esbuild/lib/main.js:1129:7)
    at /Users/xxx/61/vite-project/node_modules/esbuild/lib/main.js:1236:14
    at /Users/xxx/61/vite-project/node_modules/esbuild/lib/main.js:609:9
    at handleIncomingPacket (/Users/xxx/61/vite-project/node_modules/esbuild/lib/main.js:706:9)
    at Socket.readFromStdout (/Users/xxx/61/vite-project/node_modules/esbuild/lib/main.js:576:7)
    at Socket.emit (events.js:375:28)
    at Socket.emit (domain.js:470:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Validations

@Shinigami92
Copy link
Member

Duplicate of #2346

@Shinigami92 Shinigami92 marked this as a duplicate of #2346 Aug 24, 2021
@Shinigami92 Shinigami92 added the duplicate This issue or pull request already exists label Aug 24, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists pending triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants