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

ts_project importing json fails #2365

Closed
tomasdev opened this issue Dec 23, 2020 · 13 comments
Closed

ts_project importing json fails #2365

tomasdev opened this issue Dec 23, 2020 · 13 comments
Assignees
Labels

Comments

@tomasdev
Copy link

🐞 bug report

Affected Rule

ts_project()

Is this a regression?

Maybe it is, it seems to supposedly have test coverage at https://github.com/bazelbuild/rules_nodejs/tree/master/packages/typescript/test/ts_project/json

Description

Following an example from the tests inside @bazel/typescript pretty barebones to import a json file into a ts_project() fails.

🔬 Minimal Reproduction

See the repo https://github.com/tomasdev/ts_project_json_test/tree/main -- it has the minimal setup required.

Basically a.ts with import data from './bar.json'

🔥 Exception or Error


$ npx bazel build //... --define=VERBOSE_LOGS=1                                                                                                             ✘
INFO: Invocation ID: cb49ffda-00c0-4c7c-a873-198c51f007ae
INFO: Build option --define has changed, discarding analysis cache.
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//typescript:typescript__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//typescript:typescript__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//typescript:typescript__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//typescript:typescript__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//typescript:typescript__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//typescript:typescript__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//typescript:typescript
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//typescript:typescript: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//semver:semver__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//tslib:tslib__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/eventemitter:eventemitter__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@types/long:long__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/codegen:codegen__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/path:path__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/codegen:codegen__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//tslib:tslib__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/eventemitter:eventemitter__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@types/long:long__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//semver:semver__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/path:path__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/eventemitter:eventemitter__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@types/long:long__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//tslib:tslib__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//semver:semver__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/codegen:codegen__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/path:path__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@types/long:long__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/codegen:codegen__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//long:long__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/fetch:fetch__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/utf8:utf8__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/codegen:codegen__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@types/long:long__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//long:long__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@types/long:long__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/utf8:utf8__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/codegen:codegen__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//tsutils:tsutils__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/fetch:fetch__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//long:long__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//tsutils:tsutils__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//protobufjs:protobufjs__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/base64:base64__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//long:long__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//tsutils:tsutils__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//source-map-support:source-map-support__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/fetch:fetch__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/utf8:utf8__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//protobufjs:protobufjs__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//semver:semver__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/pool:pool__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//source-map-support:source-map-support__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//long:long__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/base64:base64__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//protobufjs:protobufjs__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//buffer-from:buffer-from__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@types/node:node__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//long:long__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/pool:pool__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//source-map-support:source-map-support__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/base64:base64__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//semver:semver__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//buffer-from:buffer-from__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@types/node:node__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@types/node:node__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/float:float__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//semver:semver__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/aspromise:aspromise__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/inquire:inquire__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//buffer-from:buffer-from__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@types/node:node__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@types/node:node__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/pool:pool__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/base64:base64__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/float:float__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@types/node:node__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/inquire:inquire__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//source-map:source-map__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/inquire:inquire__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/path:path__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/base64:base64__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/float:float__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/aspromise:aspromise__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/float:float__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//source-map:source-map__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@bazel/typescript:typescript__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/float:float__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/float:float__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/path:path__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/base64:base64__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//source-map:source-map__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//source-map-support:source-map-support__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/aspromise:aspromise__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/inquire:inquire__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//tsutils:tsutils__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@bazel/typescript:typescript__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//protobufjs:protobufjs__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/inquire:inquire__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//source-map-support:source-map-support__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/pool:pool__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/pool:pool__nested_node_modules
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@bazel/typescript:typescript__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//tsutils:tsutils__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//protobufjs:protobufjs__files
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//tsutils:tsutils__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@bazel/typescript:typescript__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//source-map-support:source-map-support__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/inquire:inquire__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/path:path__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@bazel/typescript:typescript__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@protobufjs/pool:pool__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//protobufjs:protobufjs__contents
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//buffer-from:buffer-from__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//source-map:source-map__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/utf8:utf8__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@bazel/typescript:typescript__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for @npm//@bazel/typescript:typescript
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/fetch:fetch__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//buffer-from:buffer-from__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/eventemitter:eventemitter__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//tslib:tslib__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/utf8:utf8__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//buffer-from:buffer-from__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/fetch:fetch__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/eventemitter:eventemitter__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//source-map:source-map__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//tslib:tslib__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/aspromise:aspromise__files: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/fetch:fetch__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//source-map:source-map__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/eventemitter:eventemitter__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//tslib:tslib__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/utf8:utf8__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/aspromise:aspromise__nested_node_modules: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@protobufjs/aspromise:aspromise__contents: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/common/module_mappings.bzl:41:14: [module_mappings.bzl] Mappings at @npm//@bazel/typescript:typescript: {}
DEBUG: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/external/build_bazel_rules_nodejs/internal/linker/link_node_modules.bzl:19:14: [link_node_modules.bzl] No LinkablePackageInfo for //:_validate_tsconfig-no-outdir_options
INFO: Analyzed 2 targets (1 packages loaded, 845 targets configured).
INFO: Found 2 targets...
INFO: From Action _validate_tsconfig-no-outdir_options.optionsvalid.d.ts:
[link_node_modules.js] manifest file bazel-out/darwin-fastbuild/bin/__validate_tsconfig-no-outdir_options.module_mappings.json
[link_node_modules.js] manifest contents {
  "workspace": "test",
  "bin": "bazel-out/darwin-fastbuild/bin",
  "root": "npm/node_modules",
  "modules": {}
}
[link_node_modules.js] startCwd /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/4/execroot/test
[link_node_modules.js] isExecroot true
[link_node_modules.js] resolved node_modules root npm/node_modules to /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/4/execroot/test/external/npm/node_modules
[link_node_modules.js] cwd /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/4/execroot/test
[link_node_modules.js] symlink( node_modules -> /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/4/execroot/test/external/npm/node_modules )
[link_node_modules.js] mapping hierarchy []
bazel node patches enabled. root: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/4/execroot symlinks in this directory will not escape
INFO: From Compiling TypeScript project //:tsconfig-no-outdir [tsc -p tsconfig.json]:
[link_node_modules.js] manifest file bazel-out/darwin-fastbuild/bin/_tsconfig-no-outdir.module_mappings.json
[link_node_modules.js] manifest contents {
  "workspace": "test",
  "bin": "bazel-out/darwin-fastbuild/bin",
  "root": "npm/node_modules",
  "modules": {}
}
[link_node_modules.js] startCwd /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test
[link_node_modules.js] isExecroot true
[link_node_modules.js] resolved node_modules root npm/node_modules to /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/external/npm/node_modules
[link_node_modules.js] cwd /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test
[link_node_modules.js] symlink( node_modules -> /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/external/npm/node_modules )
[link_node_modules.js] mapping hierarchy []
bazel node patches enabled. root: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot symlinks in this directory will not escape
======== Resolving module './bar.json' from '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/a.ts'. ========
Module resolution kind is not specified, using 'NodeJs'.
Loading module as file / folder, candidate module location '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json', target file type 'TypeScript'.
File '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json.ts' does not exist.
File '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json.tsx' does not exist.
File '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json.d.ts' does not exist.
Directory '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json' does not exist, skipping all lookups in it.
Loading module as file / folder, candidate module location '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json', target file type 'JavaScript'.
File '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json.js' does not exist.
File '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json.jsx' does not exist.
Directory '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json' does not exist, skipping all lookups in it.
Loading module as file / folder, candidate module location '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json', target file type 'Json'.
File '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json' exist - use it as a name resolution result.
======== Module name './bar.json' was successfully resolved to '/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json'. ========
TSFILE: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bazel-out/darwin-fastbuild/bin/bar.json
TSFILE: /private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bazel-out/darwin-fastbuild/bin/a.js
/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/node_modules/typescript/lib/lib.d.ts
/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/node_modules/typescript/lib/lib.es5.d.ts
/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/node_modules/typescript/lib/lib.dom.d.ts
/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/node_modules/typescript/lib/lib.webworker.importscripts.d.ts
/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/node_modules/typescript/lib/lib.scripthost.d.ts
/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bar.json
/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/a.ts
/private/var/tmp/_bazel_tomas/0ff22fe21c0ca19fa5517aaa75bd6c5b/sandbox/darwin-sandbox/5/execroot/test/bazel-out/darwin-fastbuild/bin/_validate_tsconfig-no-outdir_options.optionsvalid.d.ts
Files:                          8
Lines:                      24832
Nodes:                     111243
Identifiers:                40852
Symbols:                    27821
Types:                       8383
Instantiations:              4558
Memory used:               68313K
Assignability cache size:    2964
Identity cache size:            0
Subtype cache size:             0
Strict subtype cache size:      0
I/O Read time:              0.00s
Parse time:                 0.59s
ResolveTypeReference time:  0.00s
ResolveModule time:         0.00s
Program time:               0.61s
Bind time:                  0.22s
Check time:                 1.22s
transformTime time:         0.01s
commentTime time:           0.00s
I/O Write time:             0.00s
printTime time:             0.01s
Emit time:                  0.02s
Total time:                 2.06s
ERROR: /Users/tomas/WORK/ts_project_json_test/BUILD.bazel:3:11: output 'ar.json' was not created
ERROR: /Users/tomas/WORK/ts_project_json_test/BUILD.bazel:3:11: not all outputs were created or valid
INFO: Elapsed time: 5.490s, Critical Path: 3.53s
INFO: 5 processes: 3 internal, 2 darwin-sandbox.
FAILED: Build did NOT complete successfully

🌍 Your Environment

Operating System:

  
Mac OS X Big Sur 11.0.1
  

Output of bazel version:

  
Bazelisk version: v1.7.3
Build label: 3.6.0
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Oct 6 13:16:23 2020 (1601990183)
Build timestamp: 1601990183
Build timestamp as int: 1601990183
  

Rules_nodejs version:

(Please check that you have matching versions between WORKSPACE file and @bazel/* npm packages.)

  
3.0.0
  

(just released :D)

@tomasdev
Copy link
Author

Checking https://github.com/bazelbuild/rules_nodejs/blob/master/packages/typescript/internal/ts_project.bzl#L109

I wonder what's the 1: for? Is it supposed to be to cover the / in the path? Something seems wrong (since the error complains about ar.json instead of bar.json)

ctx.actions.declare_file(_join(ctx.attr.out_dir, src.short_path[len(ctx.label.package) + 1:]))

@alexeagle
Copy link
Collaborator

Yeah seems like our test has a nested directory and that's why it passes there

@tomasdev
Copy link
Author

tomasdev commented Dec 24, 2020

@alexeagle FYI, I've tried having foo/baz.json instead of bar.json and still errored out:

ERROR: /Users/tomas/WORK/ts_project_json_test/BUILD.bazel:3:11: output 'oo/baz.json' was not created

The issue happens disregarding where a.ts is (inside foo folder, or at root level)

@lencioni
Copy link
Contributor

lencioni commented Jan 4, 2021

I've also run into this. On v2 I was overloading the extends attr with all of the json files so they would at least be available in the sandbox for other projects to depend on them, but that still loses the type info when running TypeScript via ts_project and is no longer an option with v3 since extends will no longer accept a list of files.

I think we need to add a boolean attr for resolve_json_module that works similarly to the allow_js attr.

lencioni added a commit to lencioni/rules_nodejs that referenced this issue Jan 6, 2021
As of TypeScript v2.9, `tsc` can read and extract types from `.json`
files by using the `resolveJsonModule` option.

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#new---resolvejsonmodule

The new behavior allows people to pass `resolve_json_module` to
`ts_project` in order to expect `.json` files from `tsc`.

This change was modeled after the previous `allow_js` work in bazel-contrib#2260.

Fixes bazel-contrib#2365
@lencioni
Copy link
Contributor

lencioni commented Jan 6, 2021

I've taken a swing at adding support for this in #2384

@mattem mattem added the bug label Jan 7, 2021
@lencioni
Copy link
Contributor

lencioni commented Jan 14, 2021

I think that resolving this properly would be easier if TypeScript could be configured to emit declaration files for .json files. See:

@lencioni
Copy link
Contributor

lencioni commented Jan 14, 2021

I've been digging into this more, I don't see a full solution at this time. Here's a WIP diff of what I was working on at #2384 (comment) if anyone wants to take a look.

The test scenario I was trying to solve for is having 2 projects that import a .json file and use it for types. Something like this in project 1:

import config from './config.json';

export interface Testing {
  aNumber: typeof config['aNumber'];
  someOtherNumber: typeof config['aNumber'];
}

export default function fn(): Testing {
  return {
    // @ts-expect-error
    aNumber: config.aString,
    // @ts-expect-error
    someOtherNumber: 'hi',
  };
}

And in project 2:

import { Testing } from '../project-1';
import config from '../project-1/config.json';

export default function fn(): Testing {
  return {
    // @ts-expect-error
    aNumber: config.aString,
    // @ts-expect-error
    someOtherNumber: 'hi',
  };
}

I've worked out how to make the .json files are available to TypeScript for types, and ensure that the types flow across projects successfully. I was able to do this by making some changes to my PR above, like this one where the json files are declared and copied in:

+    json_srcs = []
+    if ctx.attr.resolve_json_module == True:
+        for src in ctx.files.srcs:
+            if src.path.endswith(".json"):
+                declared = ctx.actions.declare_file(src.short_path[len(ctx.label.package) + 1:]
+                ctx.actions.expand_template(
+                    output = declared,
+                    substitutions = {},
+                    template = src,
+                )
+                json_srcs.append(declared)
+
+        # resolve_json_module is True, which means that TypeScript will read
+        # and extract types from .json files, but it will not emit declaration
+        # files for these. We need to ensure that these .json files are passed
+        # along in the DeclarationInfo provider.
+        typings_outputs = typings_outputs + json_srcs

However, this does not allow the .json file to be imported across projects because it is outside of the rootDir. The main problem is that tsc does not emit .d.ts files for .json files, which means that when you import the .json file, tsc needs to be able to read the .json file and not the .d.ts file. And, Bazel needs the rootDir to be scoped to the project. So the import of the config.json file in a different project ends up failing because it is not included in the rootDir.

@joneshf
Copy link

joneshf commented Apr 4, 2021

As it stands now, this is broken if you have a ts_project in the root that imports a JSON file. Would an incremental fix of the src.short_path[len(ctx.label.package) + 1:] logic be acceptable so at least people like me consuming rules_nodejs could have a ts_project in the root that imports a JSON file?

Maybe something like:

def _normalize_json_path(package, path):
    if len(package) == 0:
        return path
    else:
        return path[len(package) + 1:]

And then call it like:

-            ctx.actions.declare_file(_join(ctx.attr.out_dir, src.short_path[len(ctx.label.package) + 1:]))
+            ctx.actions.declare_file(_join(ctx.attr.out_dir, _normalize_json_path(ctx.label.package, src.short_path)))

@mattem
Copy link
Collaborator

mattem commented Apr 13, 2021

Think this was resolved by #2602?

@mattem mattem added the Can Close? We will close this in 30 days if there is no further activity label Apr 13, 2021
@tomasdev
Copy link
Author

tomasdev commented Apr 13, 2021

@mattem has #2602 been released to npm?

It doesn't seem fixed @latest (bazelisk 1.7.5)

@github-actions github-actions bot removed the Can Close? We will close this in 30 days if there is no further activity label Apr 14, 2021
@mattem
Copy link
Collaborator

mattem commented Apr 15, 2021

@b-ram
Copy link

b-ram commented Apr 20, 2021

@alexeagle : Any updates on this issue? I would like to move a typescript monorepo into bazel and this is blocking us.

@alexeagle
Copy link
Collaborator

@b-ram can you give a fresh repro or file a new issue? From the thread above it seems like this is already fixed, at least for some cases.

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

Successfully merging a pull request may close this issue.

6 participants