bug(webpack): Typescript emitted no output
See original GitHub issue- 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.
- Prepare a Universal bundle as specified here
- Attempt to compile using
npm run build:dynamic
- 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
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Webpack with typescript getting TypeScript emitted no output ...
First change webpack config entry like index.js to index.tsx. Second make sure rule added for tsx file like: { test: /\.
Read more >Typescript emitted no output · Issue #767 · TypeStrong/ts-loader
Getting the following error: Module build failed: Error: Typescript emitted no output for C:\xampp\htdocs\node-api\src\js\server.ts.
Read more >webpack/webpack - Gitter
src/app.ts Module build failed: Error: Typescript emitted no output for /Users/administrator/WebstormProjects/TypescriptFifthApp/src/app.ts at Object.loader ...
Read more >Typescript+webpack: typescript emmited no output for index.d.ts
Now, when I run webpack, I get this error: Typescript emitted no output for […]\index.d.ts. How should I solve this problem?
Read more >ts-loader - npm
To output a built .d.ts file, you can use the DeclarationBundlerPlugin in your webpack config. Failing the build on TypeScript compilation error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK, I just published new version
5.1.4
but I believe you do need to make the fix I mention above as well.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:
to this:
I am still testing now, though, and will post any additional fixes.