Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

bug(webpack): Typescript emitted no output #41

Closed
2 of 8 tasks
CaerusKaru opened this issue Sep 23, 2017 · 10 comments
Closed
2 of 8 tasks

bug(webpack): Typescript emitted no output #41

CaerusKaru opened this issue Sep 23, 2017 · 10 comments

Comments

@CaerusKaru
Copy link
Member

  • I'm submitting a ...
  • bug report
  • feature request
  • Which parts of preboot are affected by this issue?
  • server side
  • client side
  • inline
  • build process
  • docs
  • tests
  • Do you want to request a feature or report a bug?

Bug report

  • What is the current behavior?

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem by creating a github repo.

  1. Prepare a Universal bundle as specified here
  2. Attempt to compile using npm run build:dynamic
  3. Receive the below error
  • What is the expected behavior?

Should be able to compile a bundle that relies on preboot

  • What is the motivation / use case for changing the behavior?

Unable to use webpack to build a nodejs bundle from a TypeScript source

  • Please tell us about your environment:
  • Language: [all | TypeScript 2.5.2 | ES6/7 | ES5 ]
  • OS: [all | Mac OS X | Windows | Linux ]
  • Platform: [all | NodeJs | Java | PHP | .Net | Ruby]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
ERROR in ./node_modules/preboot/src/server/server-preboot.module.ts
Module build failed: Error: Typescript emitted no output for /home/debian/angular2/ngvirtualgrade/node_modules/preboot/src/server/server-preboot.module.ts.
You should not need to recompile .ts files in node_modules.
Please contact the package author to advise them to use --declaration --outDir.
More https://github.com/Microsoft/TypeScript/issues/12358
@jeffwhelpley
Copy link
Contributor

I have not seen this one before. I will have time tomorrow to try this out and I will let you know.

@iamonuwa
Copy link

iamonuwa commented Oct 2, 2017

@jeffwhelpley this error still persists

@brexis
Copy link

brexis commented Oct 4, 2017

Any idea on how to solve this?

@jeffwhelpley
Copy link
Contributor

Apologies. This is a solvable issue. I just haven't had time to dive in. Since there are now at least 3 people running into this, I will bump up the priority on my list and get to it later this week.

@brexis
Copy link

brexis commented Oct 4, 2017

@jeffwhelpley thank you

CaerusKaru added a commit to CaerusKaru/preboot that referenced this issue Oct 5, 2017
@jeffwhelpley
Copy link
Contributor

hey, are you guys using ts-loader? what version of TypeScript? I started working on this today and will be publishing a new version of Preboot later tonight, but I could not recreate the error. It may be because this only affects certain versions of TypeScript:

TypeStrong/ts-loader#278

@CaerusKaru
Copy link
Member Author

Versions:

├── ts-loader@2.3.7 
└── typescript@2.5.3 

@jeffwhelpley
Copy link
Contributor

I am pushing out another version shortly, but I noticed that a fix to this is to very simply change this line in your webpack.server.config.js:

resolve: { extensions: [".ts", ".js"] },

to this:

resolve: { extensions: [".js", ".ts"] },

I am still testing now, though, and will post any additional fixes.

@jeffwhelpley
Copy link
Contributor

OK, I just published new version 5.1.4 but I believe you do need to make the fix I mention above as well.

@JoseFMP
Copy link

JoseFMP commented Dec 26, 2018

For me this issue is still happening.

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

5 participants