Skip to content

Commit

Permalink
ci: repro bazel-contrib#2044 where typings cannot be resolved
Browse files Browse the repository at this point in the history
Error now is:
ERROR: /Users/alex.eagle/Projects/rules_nodejs/packages/typescript/test/ts_project/b/BUILD.bazel:6:1: Compiling TypeScript project //packages/typescript/test/ts_project/b:tsconfig [tsc -p packages/typescript/test/ts_project/b/tsconfig.json] failed (Exit 2) tsc.sh failed: error executing command bazel-out/host/bin/external/npm/typescript/bin/tsc.sh --emitBOM --project packages/typescript/test/ts_project/b/tsconfig.json --outDir ... (remaining 7 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
bazel-out/darwin-fastbuild/bin/packages/typescript/test/ts_project/a/a.d.ts(2,41): error TS2307: Cannot find module '@babel/parser'.
  • Loading branch information
Alex Eagle authored and alexeagle committed Jul 20, 2020
1 parent 3bd53bb commit 93484ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/typescript/test/ts_project/a/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ ts_project(
# source_map = True,
validate = False,
visibility = ["//packages/typescript/test:__subpackages__"],
# Use @babel/parser since the package.json is required to resolve "typings" field
# Repro of #2044
deps = [
"@npm//@babel/parser",
"@npm//@babel/types",
],
)
4 changes: 4 additions & 0 deletions packages/typescript/test/ts_project/a/a.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export const a: string = 'hello';

// Repro #2044
import {DecoratorsPluginOptions} from '@babel/parser';
export const o: DecoratorsPluginOptions = {};

0 comments on commit 93484ba

Please sign in to comment.