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

Failed to compile on Angular 5 #14

Closed
lukechatton opened this issue Mar 15, 2018 · 5 comments
Closed

Failed to compile on Angular 5 #14

lukechatton opened this issue Mar 15, 2018 · 5 comments

Comments

@lukechatton
Copy link

Followed the install guide and am having issues running ng serve.

ERROR in ./node_modules/ngx-markdown-editor/index.ts
Module build failed: Error: /Users/luke/forums/web/node_modules/ngx-markdown-editor/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
    at AngularCompilerPlugin.getCompiledFile (/Users/luke/forums/web/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:674:23)
    at plugin.done.then (/Users/luke/forums/web/node_modules/@ngtools/webpack/src/loader.js:467:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

webpack: Failed to compile.

editor.module.ts

import { FormsModule } from '@angular/forms';
import { EditorComponent } from './editor.component';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { LMarkdownEditorModule } from 'ngx-markdown-editor';

@NgModule({
    imports: [
        CommonModule,
        LMarkdownEditorModule,
        FormsModule,
    ],
    declarations: [
        EditorComponent
    ],
    exports: [
        EditorComponent
    ]
})
export class EditorModule { }

editor.component.html

<div class='wrapper'>
    <md-editor name="Content" [(ngModel)]="content" [height]="'200px'" maxlength="500"></md-editor>
</div>
@lukechatton
Copy link
Author

Angular CLI: 1.7.3
Node: 8.9.1
OS: darwin x64
Angular: 5.2.8
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cdk: 5.2.4
@angular/cli: 1.7.3
@angular/flex-layout: 5.0.0-beta.13
@angular/material: 5.2.4
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.4.2
webpack: 3.11.0

@instance-oom
Copy link
Owner

Please try to add this to tsconfig.json

"include": [
    "src/",
    "node_modules/ngx-markdown-editor/index.ts"
]

This issue i will check it later, thanks

@olozzalap
Copy link

I am getting this same exact issue as @lukechatton !

@olozzalap
Copy link

And unfortunately the tsconfig.json fix did not change the error

@instance-oom
Copy link
Owner

Please try to use 1.1.7 version

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

3 participants