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

The order of entries in project references make initial build fail or pass #33947

Closed
Bnaya opened this issue Oct 11, 2019 · 6 comments
Closed

Comments

@Bnaya
Copy link

Bnaya commented Oct 11, 2019

TypeScript Version: ^3.7.0-dev.20191011

Search Terms: composite project build references

I'm working on making react-admin being built as a composite project WIP PR
I'm making use of allowJS, decelerations, composite
disclaimer: i'm not a maintainer there

On the first build of a project (as in ci without build cache) the build might fail, depends on the order of entries in the references entry.
With error:

Cannot find module 'xxx'.

For example, this tsconfig fails with Cannot find module 'ra-core'
Code

{
    "references": [
        { "path": "packages/ra-tree-ui-materialui" },
        { "path": "packages/ra-core" },
        { "path": "packages/ra-i18n-polyglot" },
        { "path": "packages/ra-ui-materialui" },
        { "path": "packages/react-admin" },
        { "path": "packages/ra-data-fakerest" },
        { "path": "packages/ra-data-graphcool" },
        { "path": "packages/ra-data-graphql" },
        { "path": "packages/ra-data-graphql-simple" },
        { "path": "packages/ra-data-json-server" },
        { "path": "packages/ra-data-simple-rest" },
        { "path": "packages/ra-input-rich-text" },
        { "path": "packages/ra-realtime" },
        { "path": "packages/ra-tree-core" }
    ],
}

But

{
    "references": [
        { "path": "packages/ra-core" },
        { "path": "packages/ra-i18n-polyglot" },
        { "path": "packages/ra-ui-materialui" },
        { "path": "packages/react-admin" },
        { "path": "packages/ra-data-fakerest" },
        { "path": "packages/ra-data-graphcool" },
        { "path": "packages/ra-data-graphql" },
        { "path": "packages/ra-data-graphql-simple" },
        { "path": "packages/ra-data-json-server" },
        { "path": "packages/ra-data-simple-rest" },
        { "path": "packages/ra-input-rich-text" },
        { "path": "packages/ra-realtime" },
        { "path": "packages/ra-tree-core" },
        { "path": "packages/ra-tree-ui-materialui" }
    ]
}

pass.

Running the build again making it pass.

Repro (Sorry, its not very minimal)
pull the following branch: https://github.com/Bnaya/react-admin/tree/allowjs-plus-declarations
yarn; yarn cleanup; yarn build-with-composite

Failing CI job:
https://travis-ci.org/marmelab/react-admin/builds/596615134#L588

Passing CI job:
https://travis-ci.org/marmelab/react-admin/builds/596646435

@Bnaya
Copy link
Author

Bnaya commented Oct 11, 2019

--verbose output of failing build:
Projects in this build: 
    * packages/ra-tree-ui-materialui/tsconfig.json
    * packages/ra-core/tsconfig.json
    * packages/ra-i18n-polyglot/tsconfig.json
    * packages/ra-ui-materialui/tsconfig.json
    * packages/react-admin/tsconfig.json
    * packages/ra-data-fakerest/tsconfig.json
    * packages/ra-data-graphcool/tsconfig.json
    * packages/ra-data-graphql/tsconfig.json
    * packages/ra-data-graphql-simple/tsconfig.json
    * packages/ra-data-json-server/tsconfig.json
    * packages/ra-data-simple-rest/tsconfig.json
    * packages/ra-input-rich-text/tsconfig.json
    * packages/ra-realtime/tsconfig.json
    * packages/ra-tree-core/tsconfig.json
    * tsconfig.json

[6:42:32 PM] Project 'packages/ra-tree-ui-materialui/tsconfig.json' is out of date because output file 'packages/ra-tree-ui-materialui/lib/DragLayer.js' does not exist

[6:42:32 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-tree-ui-materialui/tsconfig.json'...

[6:42:37 PM] Project 'packages/ra-core/tsconfig.json' is out of date because output file 'packages/ra-core/lib/CoreAdmin.js' does not exist

[6:42:37 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-core/tsconfig.json'...

[6:42:40 PM] Project 'packages/ra-i18n-polyglot/tsconfig.json' is out of date because output file 'packages/ra-i18n-polyglot/lib/index.js' does not exist

[6:42:40 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-i18n-polyglot/tsconfig.json'...

packages/ra-i18n-polyglot/src/index.ts:3:30 - error TS2307: Cannot find module 'ra-core'.

3 import { I18nProvider } from 'ra-core';
~~~~~~~~~

[6:42:40 PM] Project 'packages/ra-ui-materialui/tsconfig.json' is out of date because output file 'packages/ra-ui-materialui/lib/Link.js' does not exist

[6:42:40 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-ui-materialui/tsconfig.json'...

packages/ra-ui-materialui/src/layout/Notification.tsx:16:8 - error TS2307: Cannot find module 'ra-core'.

16 } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/auth/LoginForm.tsx:9:68 - error TS2307: Cannot find module 'ra-core'.

9 import { useTranslate, useLogin, useNotify, useSafeSetState } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/auth/Login.tsx:20:30 - error TS2307: Cannot find module 'ra-core'.

20 import { useCheckAuth } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/auth/Logout.tsx:9:41 - error TS2307: Cannot find module 'ra-core'.

9 import { useTranslate, useLogout } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/button/ExportButton.tsx:11:8 - error TS2307: Cannot find module 'ra-core'.

11 } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/Labeled.tsx:6:28 - error TS2307: Cannot find module 'ra-core'.

6 import { FieldTitle } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/ArrayInput.tsx:3:40 - error TS2307: Cannot find module 'ra-core'.

3 import { isRequired, FieldTitle } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/InputHelperText.tsx:2:71 - error TS2307: Cannot find module 'ra-core'.

2 import { useTranslate, ValidationError, ValidationErrorMessage } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/BooleanInput.tsx:7:50 - error TS2307: Cannot find module 'ra-core'.

7 import { FieldTitle, useInput, InputProps } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/DateInput.tsx:4:50 - error TS2307: Cannot find module 'ra-core'.

4 import { useInput, FieldTitle, InputProps } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/NumberInput.tsx:4:50 - error TS2307: Cannot find module 'ra-core'.

4 import { useInput, FieldTitle, InputProps } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/ReferenceInput.tsx:15:8 - error TS2307: Cannot find module 'ra-core'.

15 } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/SelectInput.tsx:13:8 - error TS2307: Cannot find module 'ra-core'.

13 } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/TextInput.tsx:3:50 - error TS2307: Cannot find module 'ra-core'.

3 import { useInput, FieldTitle, InputProps } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/list/ExpandRowButton.tsx:5:30 - error TS2307: Cannot find module 'ra-core'.

5 import { useTranslate } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/field/types.ts:1:24 - error TS2307: Cannot find module 'ra-core'.

1 import { Record } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/field/ArrayField.tsx:4:28 - error TS2307: Cannot find module 'ra-core'.

4 import { Identifier } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/field/BooleanField.tsx:10:30 - error TS2307: Cannot find module 'ra-core'.

10 import { useTranslate } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/field/SelectField.tsx:5:42 - error TS2307: Cannot find module 'ra-core'.

5 import { ChoicesProps, useChoices } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/AutocompleteArrayInput.tsx:20:8 - error TS2307: Cannot find module 'ra-core'.

20 } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/AutocompleteInput.tsx:20:8 - error TS2307: Cannot find module 'ra-core'.

20 } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/CheckboxGroupInputItem.tsx:5:28 - error TS2307: Cannot find module 'ra-core'.

5 import { useChoices } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/CheckboxGroupInput.tsx:10:64 - error TS2307: Cannot find module 'ra-core'.

10 import { FieldTitle, useInput, InputProps, ChoicesProps } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/DateTimeInput.tsx:4:50 - error TS2307: Cannot find module 'ra-core'.

4 import { useInput, FieldTitle, InputProps } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/FileInputPreview.tsx:6:30 - error TS2307: Cannot find module 'ra-core'.

6 import { useTranslate } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/FileInput.tsx:14:52 - error TS2307: Cannot find module 'ra-core'.

14 import { useInput, useTranslate, InputProps } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/ImageInput.tsx:5:28 - error TS2307: Cannot find module 'ra-core'.

5 import { InputProps } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/NullableBooleanInput.tsx:7:64 - error TS2307: Cannot find module 'ra-core'.

7 import { useInput, useTranslate, FieldTitle, InputProps } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/RadioButtonGroupInputItem.tsx:4:28 - error TS2307: Cannot find module 'ra-core'.

4 import { useChoices } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/RadioButtonGroupInput.tsx:13:64 - error TS2307: Cannot find module 'ra-core'.

13 import { useInput, FieldTitle, InputProps, ChoicesProps } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/SearchInput.tsx:6:42 - error TS2307: Cannot find module 'ra-core'.

6 import { useTranslate, InputProps } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/input/SelectArrayInput.tsx:21:8 - error TS2307: Cannot find module 'ra-core'.

21 } from 'ra-core';
~~~~~~~~~

packages/ra-ui-materialui/src/layout/CardActions.tsx:3:25 - error TS2307: Cannot find module 'ra-core'.

3 import { warning } from 'ra-core';
~~~~~~~~~

[6:42:50 PM] Project 'packages/react-admin/tsconfig.json' is out of date because output file 'packages/react-admin/lib/Admin.js' does not exist

[6:42:50 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/react-admin/tsconfig.json'...

packages/react-admin/src/defaultI18nProvider.ts:2:34 - error TS2307: Cannot find module 'ra-i18n-polyglot'.

2 import polyglotI18nProvider from 'ra-i18n-polyglot';
~~~~~~~~~~~~~~~~~~

packages/react-admin/src/Admin.ts:1:43 - error TS2307: Cannot find module 'ra-core'.

1 import { CoreAdmin, LoginComponent } from 'ra-core';
~~~~~~~~~

packages/react-admin/src/Admin.ts:8:8 - error TS2307: Cannot find module 'ra-ui-materialui'.

8 } from 'ra-ui-materialui';
~~~~~~~~~~~~~~~~~~

packages/react-admin/src/AdminRouter.ts:1:33 - error TS2307: Cannot find module 'ra-core'.

1 import { CoreAdminRouter } from 'ra-core';
~~~~~~~~~

packages/react-admin/src/AdminRouter.ts:2:25 - error TS2307: Cannot find module 'ra-ui-materialui'.

2 import { Loading } from 'ra-ui-materialui';
~~~~~~~~~~~~~~~~~~

packages/react-admin/src/index.ts:3:15 - error TS2307: Cannot find module 'ra-core'.

3 export * from 'ra-core';
~~~~~~~~~

packages/react-admin/src/index.ts:4:15 - error TS2307: Cannot find module 'ra-ui-materialui'.

4 export * from 'ra-ui-materialui';
~~~~~~~~~~~~~~~~~~

packages/react-admin/src/index.ts:7:42 - error TS2307: Cannot find module 'ra-ui-materialui'.

7 export { Notification, Pagination } from 'ra-ui-materialui';
~~~~~~~~~~~~~~~~~~

[6:42:50 PM] Project 'packages/ra-data-fakerest/tsconfig.json' is out of date because output file 'packages/ra-data-fakerest/lib/index.js' does not exist

[6:42:50 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-fakerest/tsconfig.json'...

packages/ra-data-fakerest/src/index.ts:2:30 - error TS2307: Cannot find module 'ra-core'.

2 import { DataProvider } from 'ra-core';
~~~~~~~~~

[6:42:50 PM] Project 'packages/ra-data-graphcool/tsconfig.json' is out of date because output file 'packages/ra-data-graphcool/lib/buildGqlQuery.js' does not exist

[6:42:50 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-graphcool/tsconfig.json'...

[6:42:51 PM] Project 'packages/ra-data-graphql/tsconfig.json' is out of date because output file 'packages/ra-data-graphql/lib/buildApolloClient.js' does not exist

[6:42:51 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-graphql/tsconfig.json'...

[6:42:51 PM] Project 'packages/ra-data-graphql-simple/tsconfig.json' is out of date because output file 'packages/ra-data-graphql-simple/lib/buildGqlQuery.js' does not exist

[6:42:51 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-graphql-simple/tsconfig.json'...

[6:42:51 PM] Project 'packages/ra-data-json-server/tsconfig.json' is out of date because output file 'packages/ra-data-json-server/lib/index.js' does not exist

[6:42:51 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-json-server/tsconfig.json'...

packages/ra-data-json-server/src/index.ts:2:42 - error TS2307: Cannot find module 'ra-core'.

2 import { fetchUtils, DataProvider } from 'ra-core';
~~~~~~~~~

[6:42:51 PM] Project 'packages/ra-data-simple-rest/tsconfig.json' is out of date because output file 'packages/ra-data-simple-rest/lib/index.js' does not exist

[6:42:51 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-simple-rest/tsconfig.json'...

packages/ra-data-simple-rest/src/index.ts:2:42 - error TS2307: Cannot find module 'ra-core'.

2 import { fetchUtils, DataProvider } from 'ra-core';
~~~~~~~~~

[6:42:51 PM] Project 'packages/ra-input-rich-text/tsconfig.json' is out of date because output file 'packages/ra-input-rich-text/lib/QuillBubbleStylesheet.js' does not exist

[6:42:51 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-input-rich-text/tsconfig.json'...

[6:42:53 PM] Project 'packages/ra-realtime/tsconfig.json' is out of date because output file 'packages/ra-realtime/lib/buildAction.js' does not exist

[6:42:53 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-realtime/tsconfig.json'...

[6:42:53 PM] Project 'packages/ra-tree-core/tsconfig.json' is out of date because output file 'packages/ra-tree-core/lib/TreeController.js' does not exist

[6:42:53 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-tree-core/tsconfig.json'...

Found 45 errors.

@Bnaya
Copy link
Author

Bnaya commented Oct 11, 2019

--verbose output of passing build:
Projects in this build: 
    * packages/ra-core/tsconfig.json
    * packages/ra-i18n-polyglot/tsconfig.json
    * packages/ra-ui-materialui/tsconfig.json
    * packages/react-admin/tsconfig.json
    * packages/ra-data-fakerest/tsconfig.json
    * packages/ra-data-graphcool/tsconfig.json
    * packages/ra-data-graphql/tsconfig.json
    * packages/ra-data-graphql-simple/tsconfig.json
    * packages/ra-data-json-server/tsconfig.json
    * packages/ra-data-simple-rest/tsconfig.json
    * packages/ra-input-rich-text/tsconfig.json
    * packages/ra-realtime/tsconfig.json
    * packages/ra-tree-core/tsconfig.json
    * packages/ra-tree-ui-materialui/tsconfig.json
    * tsconfig.json

[6:47:28 PM] Project 'packages/ra-core/tsconfig.json' is out of date because output file 'packages/ra-core/lib/CoreAdmin.js' does not exist

[6:47:28 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-core/tsconfig.json'...

[6:47:33 PM] Project 'packages/ra-i18n-polyglot/tsconfig.json' is out of date because output file 'packages/ra-i18n-polyglot/lib/index.js' does not exist

[6:47:33 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-i18n-polyglot/tsconfig.json'...

[6:47:34 PM] Project 'packages/ra-ui-materialui/tsconfig.json' is out of date because output file 'packages/ra-ui-materialui/lib/Link.js' does not exist

[6:47:34 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-ui-materialui/tsconfig.json'...

[6:47:46 PM] Project 'packages/react-admin/tsconfig.json' is out of date because output file 'packages/react-admin/lib/Admin.js' does not exist

[6:47:46 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/react-admin/tsconfig.json'...

[6:47:46 PM] Project 'packages/ra-data-fakerest/tsconfig.json' is out of date because output file 'packages/ra-data-fakerest/lib/index.js' does not exist

[6:47:46 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-fakerest/tsconfig.json'...

[6:47:46 PM] Project 'packages/ra-data-graphcool/tsconfig.json' is out of date because output file 'packages/ra-data-graphcool/lib/buildGqlQuery.js' does not exist

[6:47:46 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-graphcool/tsconfig.json'...

[6:47:47 PM] Project 'packages/ra-data-graphql/tsconfig.json' is out of date because output file 'packages/ra-data-graphql/lib/buildApolloClient.js' does not exist

[6:47:47 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-graphql/tsconfig.json'...

[6:47:47 PM] Project 'packages/ra-data-graphql-simple/tsconfig.json' is out of date because output file 'packages/ra-data-graphql-simple/lib/buildGqlQuery.js' does not exist

[6:47:47 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-graphql-simple/tsconfig.json'...

[6:47:48 PM] Project 'packages/ra-data-json-server/tsconfig.json' is out of date because output file 'packages/ra-data-json-server/lib/index.js' does not exist

[6:47:48 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-json-server/tsconfig.json'...

[6:47:48 PM] Project 'packages/ra-data-simple-rest/tsconfig.json' is out of date because output file 'packages/ra-data-simple-rest/lib/index.js' does not exist

[6:47:48 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-data-simple-rest/tsconfig.json'...

[6:47:48 PM] Project 'packages/ra-input-rich-text/tsconfig.json' is out of date because output file 'packages/ra-input-rich-text/lib/QuillBubbleStylesheet.js' does not exist

[6:47:48 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-input-rich-text/tsconfig.json'...

[6:47:49 PM] Project 'packages/ra-realtime/tsconfig.json' is out of date because output file 'packages/ra-realtime/lib/buildAction.js' does not exist

[6:47:49 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-realtime/tsconfig.json'...

[6:47:49 PM] Project 'packages/ra-tree-core/tsconfig.json' is out of date because output file 'packages/ra-tree-core/lib/TreeController.js' does not exist

[6:47:49 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-tree-core/tsconfig.json'...

[6:47:50 PM] Project 'packages/ra-tree-ui-materialui/tsconfig.json' is out of date because output file 'packages/ra-tree-ui-materialui/lib/DragLayer.js' does not exist

[6:47:50 PM] Building project '/Users/bnaya/dev/opensource/react-admin/packages/ra-tree-ui-materialui/tsconfig.json'...

@sheetalkamat
Copy link
Member

This seems to be happening because of shared module resolution cache between projects..

When building `10:39:56 AM - Building project 'c:/temp/react-admin/packages/ra-tree-ui-materialui/tsconfig.json'...` the `ra-core` module is resolved as not present and that information is saved. And error isn't reported because it is from `.js` file without ts-check enabled?
```
======== Resolving module 'ra-core' from 'c:/temp/react-admin/packages/ra-tree-ui-materialui/src/DragPreview.js'. ========
Explicitly specified module resolution kind: 'NodeJs'.
Loading module 'ra-core' from 'node_modules' folder, target file type 'TypeScript'.
Directory 'c:/temp/react-admin/packages/ra-tree-ui-materialui/src/node_modules' does not exist, skipping all lookups in it.
File 'c:/temp/react-admin/packages/ra-tree-ui-materialui/node_modules/ra-core.ts' does not exist.
File 'c:/temp/react-admin/packages/ra-tree-ui-materialui/node_modules/ra-core.tsx' does not exist.
File 'c:/temp/react-admin/packages/ra-tree-ui-materialui/node_modules/ra-core.d.ts' does not exist.
Directory 'c:/temp/react-admin/packages/ra-tree-ui-materialui/node_modules/@types' does not exist, skipping all lookups in it.
Directory 'c:/temp/react-admin/packages/node_modules' does not exist, skipping all lookups in it.
Found 'package.json' at 'c:/temp/react-admin/node_modules/ra-core/package.json'.
'package.json' does not have a 'typesVersions' field.
File 'c:/temp/react-admin/node_modules/ra-core.ts' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core.tsx' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core.d.ts' does not exist.
'package.json' does not have a 'typings' field.
'package.json' does not have a 'types' field.
'package.json' has 'main' field 'lib/index.js' that references 'c:/temp/react-admin/node_modules/ra-core/lib/index.js'.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.js' does not exist.
Loading module as file / folder, candidate module location 'c:/temp/react-admin/node_modules/ra-core/lib/index.js', target file type 'TypeScript'.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.js.ts' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.js.tsx' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.js.d.ts' does not exist.
File name 'c:/temp/react-admin/node_modules/ra-core/lib/index.js' has a '.js' extension - stripping it.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.ts' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.tsx' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.d.ts' does not exist.
Directory 'c:/temp/react-admin/node_modules/ra-core/lib/index.js' does not exist, skipping all lookups in it.
File 'c:/temp/react-admin/node_modules/ra-core/index.ts' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core/index.tsx' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core/index.d.ts' does not exist.
File 'c:/temp/react-admin/node_modules/@types/ra-core.d.ts' does not exist.
Directory 'c:/temp/node_modules' does not exist, skipping all lookups in it.
Directory 'c:/node_modules' does not exist, skipping all lookups in it.
Loading module 'ra-core' from 'node_modules' folder, target file type 'JavaScript'.
Directory 'c:/temp/react-admin/packages/ra-tree-ui-materialui/src/node_modules' does not exist, skipping all lookups in it.
File 'c:/temp/react-admin/packages/ra-tree-ui-materialui/node_modules/ra-core.js' does not exist.
File 'c:/temp/react-admin/packages/ra-tree-ui-materialui/node_modules/ra-core.jsx' does not exist.
Directory 'c:/temp/react-admin/packages/node_modules' does not exist, skipping all lookups in it.
Found 'package.json' at 'c:/temp/react-admin/node_modules/ra-core/package.json'.
'package.json' does not have a 'typesVersions' field.
File 'c:/temp/react-admin/node_modules/ra-core.js' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core.jsx' does not exist.
'package.json' has 'main' field 'lib/index.js' that references 'c:/temp/react-admin/node_modules/ra-core/lib/index.js'.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.js' does not exist.
Loading module as file / folder, candidate module location 'c:/temp/react-admin/node_modules/ra-core/lib/index.js', target file type 'JavaScript'.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.js.js' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.js.jsx' does not exist.
File name 'c:/temp/react-admin/node_modules/ra-core/lib/index.js' has a '.js' extension - stripping it.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.js' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core/lib/index.jsx' does not exist.
Directory 'c:/temp/react-admin/node_modules/ra-core/lib/index.js' does not exist, skipping all lookups in it.
File 'c:/temp/react-admin/node_modules/ra-core/index.js' does not exist.
File 'c:/temp/react-admin/node_modules/ra-core/index.jsx' does not exist.
Directory 'c:/temp/node_modules' does not exist, skipping all lookups in it.
Directory 'c:/node_modules' does not exist, skipping all lookups in it.
======== Module name 'ra-core' was not resolved. ========
```

Later same resolution is used for packages/ra-i18n-polyglot/tsconfig.json

======== Resolving module 'ra-core' from 'c:/temp/react-admin/packages/ra-i18n-polyglot/src/index.ts'. ========
Explicitly specified module resolution kind: 'NodeJs'.
Loading module 'ra-core' from 'node_modules' folder, target file type 'TypeScript'.
Directory 'c:/temp/react-admin/packages/ra-i18n-polyglot/src/node_modules' does not exist, skipping all lookups in it.
File 'c:/temp/react-admin/packages/ra-i18n-polyglot/node_modules/ra-core.ts' does not exist.
File 'c:/temp/react-admin/packages/ra-i18n-polyglot/node_modules/ra-core.tsx' does not exist.
File 'c:/temp/react-admin/packages/ra-i18n-polyglot/node_modules/ra-core.d.ts' does not exist.
Directory 'c:/temp/react-admin/packages/ra-i18n-polyglot/node_modules/@types' does not exist, skipping all lookups in it.
Resolution for module 'ra-core' was found in cache from location 'c:/temp/react-admin/packages'.
======== Module name 'ra-core' was not resolved. ========

Building again it builds because its not using module resolution cache

In short your project references are nor representing real truth of dependencies and because errors are suppressed in some cases you dont see them.

@Bnaya
Copy link
Author

Bnaya commented Oct 14, 2019

TBH i'm not sure if i've understand,
Why won't it build ra-core when it can't find it?

@sheetalkamat
Copy link
Member

Because ra-tree-ui-materialui does not have project reference to ra-core that tells that ra-core needs to be built before it.

@Bnaya
Copy link
Author

Bnaya commented Oct 14, 2019

I've understood my problem
Thank you!

@Bnaya Bnaya closed this as completed Oct 14, 2019
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