Coder Social home page Coder Social logo

typescript-json-incremental-project-repro's Introduction

Repro for issue importing json module across project boundary in Yarn monorepo (incremental compilation)

This repo is a minimal case that exhibits the following traits:

  • It is a Yarn monorepo with two packages:

    • packages/main, this one imports a JSON file from:
    • packages/strings

Each package is its own TypeScript project, and takes advantage of TypeScript incremental compilation.

In order to see

  • Run yarn to install typescript

  • yarn repro to reproduce the issue. This runs the following commands:

    1. yarn clean - removes all build artifacts
    2. yarn build - the first build succeeds
    3. yarn build - the second one fails!

Note that the packages/main/tsconfig.json project has packages/strings/tsconfig.json listed as a reference; however, tsc still complains that the main project doesn't have foo.json in its project file list.

> yarn repro
yarn run v1.16.0
$ yarn run clean && yarn run build && yarn run build
$ find . -iname 'lib' -type d | grep -v node_modules | xargs rm -rf
$ tsc --build .
$ tsc --build .
error TS6307: File '<project-dir>/packages/strings/lib/foo.json' is not in project file list. Projects must list all files or use an 'include' pattern.


Found 1 error.

typescript-json-incremental-project-repro's People

Contributors

jrop avatar mloughry avatar

Watchers

James Cloos avatar  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.