Git Product home page Git Product logo

rules_ts_example's Introduction

rules_ts_example

This repo is an example of code that passes tsc when run with pnpm but fails when run with Bazel using rules_ts.

PNPM

~/Code/rules_ts_example/foo (main ✗) pnpm run build

> @rules_ts_example/[email protected] build /Users/user/Code/rules_ts_example/foo
> tsc

BAZEL

~/Code/rules_ts_example (main ✗) bazel build //...
INFO: Analyzed 3 targets (1 packages loaded, 50 targets configured).
INFO: Found 3 targets...
ERROR: /Users/user/Code/rules_ts_example/foo/BUILD.bazel:11:11: Compiling TypeScript project @//foo:foo_ts [tsc -p foo/tsconfig.json] failed: (Exit 1): tsc.sh failed: error executing command (from target //foo:foo_ts)
  (cd /private/var/tmp/_bazel_user/729471d7b159995c3ffbf36ad2691a5e/sandbox/darwin-sandbox/300/execroot/rules_ts_example && \
  exec env - \
    BAZEL_BINDIR=bazel-out/darwin_arm64-fastbuild/bin \
  bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/npm_typescript/tsc.sh --project foo/tsconfig.json --outDir foo --rootDir foo --declarationDir foo --tsBuildInfoFile foo/foo_ts.tsbuildinfo)
# Configuration: 0ba77a61754b8ccac68b4c11211b3ebeca24c2f07acb9bc57df3ce73dcecadb5
# Execution platform: @local_config_platform//:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
foo/src/index.tsx(40,10): error TS2786: 'Head' cannot be used as a JSX component.
  Its instance type 'Head' is not a valid JSX element.
    Type 'Head' is missing the following properties from type 'ElementClass': setState, forceUpdate, props, state, refs
foo/src/index.tsx(50,18): error TS2339: Property 'props' does not exist on type 'MyDocument'.
foo/src/index.tsx(55,12): error TS2786: 'NextScript' cannot be used as a JSX component.
  Its instance type 'NextScript' is not a valid JSX element.
    Type 'NextScript' is missing the following properties from type 'ElementClass': setState, forceUpdate, props, state, refs
INFO: Elapsed time: 3.645s, Critical Path: 3.19s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully

rules_ts_example's People

Contributors

uebelandre avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.