privatenumber / esbuild-loader

💠 Speed up your Webpack with esbuild ⚡️
MIT License
3.58k stars 106 forks source link

After upgrading from esbuild 3 version to version 4, the following error message occurs when yarn start is executed. #336

Closed siosio34 closed 1 year ago

siosio34 commented 1 year ago

Problem

After upgrading from esbuild 3 version to version 4, the following error message occurs when yarn start is executed. Below is the full text of the error log.

Error: File '../../tsconfig.json' not found.
    at $e (/Users/heka/projects/upbit-nft/node_modules/get-tsconfig/dist/index.cjs:3:9170)
    at te (/Users/heka/projects/upbit-nft/node_modules/get-tsconfig/dist/index.cjs:3:10135)
    at ie (/Users/heka/projects/upbit-nft/node_modules/get-tsconfig/dist/index.cjs:3:10865)
    at Object.Le [as getTsconfig] (/Users/heka/projects/upbit-nft/node_modules/get-tsconfig/dist/index.cjs:3:10970)
    at Object.ESBuildLoader (/Users/heka/projects/upbit-nft/node_modules/esbuild-loader/dist/index.cjs:65:36)
    at LOADER_EXECUTION (/Users/heka/projects/upbit-nft/node_modules/loader-runner/lib/LoaderRunner.js:132:14)
    at runSyncOrAsync (/Users/heka/projects/upbit-nft/node_modules/loader-runner/lib/LoaderRunner.js:133:4)
    at iterateNormalLoaders (/Users/heka/projects/upbit-nft/node_modules/loader-runner/lib/LoaderRunner.js:251:2)
    at /Users/heka/projects/upbit-nft/node_modules/loader-runner/lib/LoaderRunner.js:224:4
    at /Users/heka/projects/upbit-nft/node_modules/webpack/lib/NormalModule.js:834:15

Node.js v18.16.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: write EPIPE                                                              
    at target._send (node:internal/child_process:865:20)
    at target.send (node:internal/child_process:738:19)
    at /Users/heka/projects/upbit-nft/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/expose-rpc.js:27:31
    at new Promise (<anonymous>)
    at sendMessage (/Users/heka/projects/upbit-nft/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/expose-rpc.js:19:38)
    at /Users/heka/projects/upbit-nft/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/expose-rpc.js:60:27
    at Generator.next (<anonymous>)
    at fulfilled (/Users/heka/projects/upbit-nft/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/expose-rpc.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'

My folder architecture is as below.

config
 - webpack
   -  webpack.common.js
tsconfig.json

Expected behavior

I want it to work normally when I hit yarn start.

Minimal reproduction URL

sry

Version

v4.0.1

Node.js version

v18.16.1

Package manager

yarn

Operating system

macOS

Contributions

privatenumber commented 1 year ago

A minimal reproduction is necessary to demonstrate that there's a bug in this project, and so I'm not inadvertently spending my time offering free support.

Happy to reopen if a reproduction is provided.

I'm also happy to offer support through my sponsorship program: https://github.com/sponsors/privatenumber

SkReD commented 1 year ago

similar problem when using esbuild-loader for transpiling code from node_modules in storybook config

privatenumber commented 1 year ago

I'd love to help but I'll need to debug a reproduction