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

[@ngtools/webpack] Error: TypeScript compilation failed #8043

Closed
cyr-x opened this issue Oct 13, 2017 · 2 comments
Closed

[@ngtools/webpack] Error: TypeScript compilation failed #8043

cyr-x opened this issue Oct 13, 2017 · 2 comments

Comments

@cyr-x
Copy link

cyr-x commented Oct 13, 2017

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

The @ngtools/webpack loader throws an error if I'm using a package which was symlinked via yarn link and the resolve attribute inside the webpack config is containing '.ts' as an extension.

Versions.

ngtools/webpack 1.8.0-rc.0

Repro steps.

  1. Clone the basic example repository which is using webpack + ngtools/webpack:
    https://github.com/cyr-x/ngtools-sample

  2. Run yarn to install deps.

  3. Clone a very simple "package" repository:
    https://github.com/cyr-x/package-sample

  4. Symlink the package-sample repository via yarn link.

  5. Run yarn build && yarn start:prod (=> everything works fine)

  6. Uncommend the resolve attribute inside the webpack.config.js and repeat step 5. An error is thrown during the build step.

The log given by the failure.

ERROR in ../package-sample/index.ts
Module build failed: Error: TypeScript compilation failed.
    at plugin.done.then (/xxxx/xxxx/xxxx/ngtools-sample/node_modules/@ngtools/webpack/src/loader.js:479:27)
    at <anonymous>
 @ ./src/app.module.ts 5:0-38
 @ ./src/app.module.ngfactory.js
 @ ./src/main.ts

Desired functionality.

The build should finish without an error.

@cyr-x cyr-x changed the title [ngtools/webpack] Error: TypeScript compilation failed [@ngtools/webpack] Error: TypeScript compilation failed Oct 13, 2017
@filipesilva
Copy link
Contributor

This issue is essentially a duplicate of #6228. Please see #6228 (comment) for a description of why this scenario is not supported.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants