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

@parcel/transformer-typescript-tsc: directoryExists is not a function #6893

Closed
0xARYA opened this issue Sep 8, 2021 · 1 comment
Closed

Comments

@0xARYA
Copy link

0xARYA commented Sep 8, 2021

🐛 bug report

Gecko % npm run watch:bundle:main

> app.zylo.gecko@1.0.0 watch:bundle:main
> parcel watch --target main --dist-dir bundled/ --cache-dir bundled/.cache/main --no-hmr --no-source-maps

🚨 Build failed.

@parcel/transformer-typescript-tsc: directoryExists is not a function

  TypeError: directoryExists is not a function
  at Object.matchFiles (Gecko/node_modules/typescript/lib/typescript.js:20102:17)
  at ParseConfigHost.readDirectory (Gecko/node_modules/@parcel/ts-utils/lib/FSHost.js:105:20)
  at getFileNamesFromConfigSpecs (Gecko/node_modules/typescript/lib/typescript.js:40747:40)
  at getFileNames (Gecko/node_modules/typescript/lib/typescript.js:40250:29)
  at parseJsonConfigFileContentWorker (Gecko/node_modules/typescript/lib/typescript.js:40183:24)
  at Object.parseJsonConfigFileContent (Gecko/node_modules/typescript/lib/typescript.js:40124:16)
  at loadTSConfig (Gecko/node_modules/@parcel/ts-utils/lib/loadTSConfig.js:51:44)
  at async loadPluginConfig (Gecko/node_modules/@parcel/core/lib/requests/ConfigRequest.js:65:21)
  at async Transformation.loadTransformerConfig (Gecko/node_modules/@parcel/core/lib/Transformation.js:520:5)
  at async Transformation.loadPipeline (Gecko/node_modules/@parcel/core/lib/Transformation.js:459:20)

🎛 Configuration (.babelrc, package.json, cli command)

package.json (scripts#watch:bundle:main):
parcel build --target main --dist-dir bundled/ --cache-dir bundled/.cache/main --no-source-maps

package.json (targets):

{
    "main": {
      "source": "src/main/index.ts",
      "context": "electron-main",
      "optimize": true,
      "outputFormat": "esmodule"
    }
}

.parcelrc:

{
  "extends": "@parcel/config-default",
  "resolvers": [
    "...",
    "parcel-resolver-tsc-path",
  ],
  "transformers": {
    "*.{ts,tsx}": [
      "@parcel/transformer-typescript-tsc"
    ]
  },
}

🌍 Your Environment

Software Version(s)
Parcel 2.0.0-rc.0
Node 16.7.0
npm/Yarn 7.20.3
Operating System macOS Catalina
@mischnic
Copy link
Member

mischnic commented Sep 8, 2021

This is already fixed: #6784 in the nightly releases (npm i -D @parcel/transformer-typescript-tsc@nightly)

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

No branches or pull requests

2 participants