maiyaporn / angular2-wizard

Angular2 - Form Wizard Component
118 stars 119 forks source link

Module build error #46

Open iamonuwa opened 6 years ago

iamonuwa commented 6 years ago

ERROR in ./node_modules/angular2-wizard/src/wizard-step.component.ngfactory.ts Module build failed: Error: /home/isaac/apps/app/live/node_modules/angular2-wizard/src/wizard-step.component.ngfactory.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 (/home/isaac/apps/app/live/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:656:23) at plugin.done.then (/home/isaac/apps/app/live/node_modules/@ngtools/webpack/src/loader.js:467:39) at <anonymous> @ ./src/app/app/setup/setup.component.ngfactory.js 13:0-99 @ ./src/app/app.module.ngfactory.js @ ./src/main.ts @ multi ./src/main.ts ERROR in ./node_modules/angular2-wizard/src/wizard.component.ngfactory.ts Module build failed: Error: /home/isaac/apps/app/live/node_modules/angular2-wizard/src/wizard.component.ngfactory.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 (/home/isaac/apps/app/live/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:656:23) at plugin.done.then (/home/isaac/apps/app/live/node_modules/@ngtools/webpack/src/loader.js:467:39) at <anonymous> @ ./src/app/app/setup/setup.component.ngfactory.js 11:0-94 @ ./src/app/app.module.ngfactory.js @ ./src/main.ts @ multi ./src/main.ts

Currently running on angular -cli 1.6.6 angular2-wizard 0.4.0

hjnp commented 6 years ago

i have the same issue! @maiyaporn can help with this please ? `Angular CLI: 1.6.8 Node: 8.9.4 OS: linux x64 Angular: 5.2.4 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router

angular/cli: 1.6.8 angular-devkit/build-optimizer: 0.0.42 angular-devkit/core: 0.0.29 angular-devkit/schematics: 0.0.52 ngtools/json-schema: 1.1.0 ngtools/webpack: 1.9.8 schematics/angular: 0.1.17 typescript: 2.5.3 webpack: 3.10.0`

hjnp commented 6 years ago

@iamonuwa I was going to ask if you could compile the angular app for production? if you found the issue for this please give-me some clues about the error, i do the same, thx!

hjnp commented 6 years ago

this issue is strange because i can compile to dev but for prod i can't!

hjnp commented 6 years ago

@iamonuwa i change to this config and now compiles to prod.

"dependencies": { "@angular/animations": "^4.4.6", "@angular/common": "^4.4.6", "@angular/compiler": "^4.4.6", "@angular/core": "^4.4.6", "@angular/forms": "^4.4.6", "@angular/http": "^4.4.6", "@angular/platform-browser": "^4.4.6", "@angular/platform-browser-dynamic": "^4.4.6", "@angular/router": "^4.4.6", "angular-wizard": "^1.1.1", "angular2-wizard": "^0.4.0", "bootstrap": "^4.0.0", "cities.json": "^1.1.2", "core-js": "^2.4.1", "font-awesome": "^4.7.0", "fontawesome": "^4.7.2", "rxjs": "^5.5.6", "zone.js": "^0.8.19" }, "devDependencies": { "@angular/cli": "1.6.8", "@angular/compiler-cli": "^4.4.6", "@angular/language-service": "^4.4.6", "@types/jasmine": "~2.8.3", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "^4.0.1", "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", "ts-node": "~4.1.0", "tslint": "~5.9.1", "typescript": "~2.4.0" }

maybe its not compatible with angular 5

roblawford commented 6 years ago

Hi there, any update on this error?? Need angular 5 compatibility

themounthead commented 6 years ago

I can propose a temporary fix to the issue. Open the node_modules/angular2-wizard/package.json file and include this -

"typings": "./dist/index.d.ts"

That should resolve the error and allow you to build the App with --aot. Works with Angular 5.x as well.

hjnp commented 6 years ago

Yes, i changed the project for angular v 4, and its compiling.

iamonuwa commented 6 years ago

Thanks @hjnp @maiyaporn

ParshuReddy commented 6 years ago

@iamonuwa , i have included "typings": "./dist/index.d.ts",in package.json and tried to build it using ng build --aot, but still i'm getting the error and i'm using Angular : 5.27, angular-cli:1.7.0, node: 6.11.4. Can you help me out fixing this issue.

ynnr85 commented 6 years ago

any update about it please?

themounthead commented 6 years ago

Since the existing package doesn't conform to the new Angular lib specification, we need to instruct the cli to build it from source, which needs to be specified in the tsconfig.app.json (within the src folder)

{ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", "module": "es2015", "types": [] }, "include": [ "./**/*.ts", "../node_modules/angular2-wizard/index.ts", "../node_modules/angular2-wizard/src/**/*.ts" ], "exclude": [ "src/test.ts", "**/*.spec.ts", "../node_modules/angular2-wizard/src/**/*.spec.ts" ] }

This is compatible with angular 6.0.x using build --prod

argutierrez00 commented 6 years ago

Thanks @themounthead . This solved the issue.

RA344710 commented 6 years ago

@themounthead : { "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", "module": "es2015", "types": [] }, "include": [ ".//*.ts", "../node_modules/angular2-wizard/index.ts", "../node_modules/angular2-wizard/src/*/.ts" ], "exclude": [ "src/test.ts", "/*.spec.ts", "../node_modules/angular2-wizard/src/*/.spec.ts" ] } its not working for me. it showing errors while ng serve only. And I tried "typings": "./dist/index.d.ts" this one working, but page is not loading / respond properly when double click on text fields it working good. In production UI it showing ERROR TypeError: f.ngOnInit is not a function. what is the problem please do needful.

themounthead commented 6 years ago

@RA344710 the mentioned solution is only for the build --prod option. For simply serving the Angular App, you don't need to update the tsconfig.json. It should work as is.

joaolori commented 6 years ago

I am facing same error on build --aot and --prod with ANGULAR 5. I have tried all solutions here without any sucess...

Anyone can help on this?

RA344710 commented 6 years ago

In production(dist deployment) angula2-wizard page is not loading properly, It showing error like this: ERROR TypeError: f.ngOnInit is not a function. Plz help on this.

hemanth-sp commented 6 years ago

"typings": "./dist/index.d.ts"

in which line?????????????????????????/

maddy81818181 commented 6 years ago

You can copy whole source code to your project. You will not have any Issues.

From: hemanth sp [mailto:notifications@github.com] Sent: Tuesday, October 9, 2018 1:24 PM To: maiyaporn/angular2-wizard angular2-wizard@noreply.github.com Cc: Rao, Baswant (Contractor) baswant_rao@fanniemae.com; Comment comment@noreply.github.com Subject: [EXTERNAL] Re: [maiyaporn/angular2-wizard] Module build error (#46)

"typings": "./dist/index.d.ts"

in which line?????????????????????????/

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/maiyaporn/angular2-wizard/issues/46#issuecomment-428298546, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AlyotjoaYLFN_B5RFZvCkt3yrub-Q96cks5ujOnBgaJpZM4SUw57.

hemanth-sp commented 6 years ago

You can copy whole source code to your project. boss better do you have vedio?? help me please..

only two component source codes?

maddy81818181 commented 6 years ago

Hi,

Sorry I cannot help you on that, Just company security reasons. You have two files wizard file and wizard-step file which you can get from Github. Then you can access the component directly from your project itself.

From: hemanth sp [mailto:notifications@github.com] Sent: Tuesday, October 9, 2018 1:34 PM To: maiyaporn/angular2-wizard angular2-wizard@noreply.github.com Cc: Rao, Baswant (Contractor) baswant_rao@fanniemae.com; Comment comment@noreply.github.com Subject: [EXTERNAL] Re: [maiyaporn/angular2-wizard] Module build error (#46)

You can copy whole source code to your project. boss better do you have vedio?? help me please

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/maiyaporn/angular2-wizard/issues/46#issuecomment-428301962, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AlyotgrE-DfHc3-JFjo4U6arGcQCSMuyks5ujOwegaJpZM4SUw57.

hemanth-sp commented 6 years ago

thank you i downloaded from git-hub code now its working fine in prod build

maddy81818181 commented 6 years ago

Cool

From: hemanth sp [mailto:notifications@github.com] Sent: Tuesday, October 9, 2018 2:49 PM To: maiyaporn/angular2-wizard angular2-wizard@noreply.github.com Cc: Rao, Baswant (Contractor) baswant_rao@fanniemae.com; Comment comment@noreply.github.com Subject: [EXTERNAL] Re: [maiyaporn/angular2-wizard] Module build error (#46)

thank you i downloaded from git-hub code now its working fine in prod build

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/maiyaporn/angular2-wizard/issues/46#issuecomment-428326721, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Alyots3wxwvNzFX1_tGpYePxuHORqw0uks5ujP2rgaJpZM4SUw57.