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

New analog project could not compile #75

Closed
KylerJohnsonDev opened this issue Sep 3, 2022 · 2 comments · Fixed by #76
Closed

New analog project could not compile #75

KylerJohnsonDev opened this issue Sep 3, 2022 · 2 comments · Fixed by #76
Labels
bug Something isn't working

Comments

@KylerJohnsonDev
Copy link
Contributor

Please provide the environment you discovered this bug in.

Apple Macbook M1 - local

Which area/package is the issue in?

Don't know / Other

Description

Steps to reproduce:

  1. Run yarn create analog analog-test
  2. navigate to analog-test directory
  3. run yarn to install dependencies
  4. Observe error

Note: I experienced the same issue using npm

I was able to solve this problem and successfully run the app after making two changes to the tsconfig.app.json:

  1. Add "src/**/*.component.ts" to the includes array
  2. Changing the composite compiler option to false

I'm not sure if this is the optimal solution but but it got the project running.

Please provide the exception or error you saw

✘ [ERROR] [plugin angular-compiler] TS6304: Composite projects may not disable declaration emit.

✘ [ERROR] [plugin angular-compiler] TS6307: File '/Users/kjohnson/analog-test-2/src/app/app.component.ngtypecheck.ts' is not listed within the file list of project '/Users/kjohnson/analog-test-2/tsconfig.app.json'. Projects must list all files or use an 'include' pattern.

    src/app/app.component.ts:0:0:
      0 │
        ╵ ^

✘ [ERROR] [plugin angular-compiler] TS6307: File '/Users/kjohnson/analog-test-2/src/app/app.component.ts' is not listed within the file list of project '/Users/kjohnson/analog-test-2/tsconfig.app.json'. Projects must list all files or use an 'include' pattern.

    src/main.ts:5:29:
      5 │ import { AppComponent } from './app/app.component';
        ╵                              ~~~~~~~~~~~~~~~~~~~~~

error when optimizing deps:
Error: Build failed with 3 errors:
error: TS6304: Composite projects may not disable declaration emit.
src/app/app.component.ts:0:0: ERROR: [plugin: angular-compiler] TS6307: File '/Users/kjohnson/analog-test-2/src/app/app.component.ngtypecheck.ts' is not listed within the file list of project '/Users/kjohnson/analog-test-2/tsconfig.app.json'. Projects must list all files or use an 'include' pattern.
src/main.ts:5:29: ERROR: [plugin: angular-compiler] TS6307: File '/Users/kjohnson/analog-test-2/src/app/app.component.ts' is not listed within the file list of project '/Users/kjohnson/analog-test-2/tsconfig.app.json'. Projects must list all files or use an 'include' pattern.
    at failureErrorWithLog (/Users/kjohnson/analog-test-2/node_modules/vite/node_modules/esbuild/lib/main.js:1624:15)
    at /Users/kjohnson/analog-test-2/node_modules/vite/node_modules/esbuild/lib/main.js:1266:28
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


### Other information

Node version: 16.15.1
Yarn version: 1.22.19
Npm versions: 8.11.0

### I would be willing to submit a PR to fix this issue

- [X] Yes
- [ ] No
@KylerJohnsonDev KylerJohnsonDev added the bug Something isn't working label Sep 3, 2022
@KylerJohnsonDev
Copy link
Contributor Author

KylerJohnsonDev commented Sep 3, 2022

Running the vite optimize post install script produces this error. Here is a link to a github repo with my analog project. The main branch contains no changes so you should see the above errors.

This is a PR into my main branch showing what I changed in order to compile and run the app.

@brandonroberts
Copy link
Member

My guess it was this PR that caused it. #65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants