angular2-wizard icon indicating copy to clipboard operation
angular2-wizard copied to clipboard

Module build error

Open iamonuwa opened this issue 7 years ago • 22 comments
trafficstars

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

iamonuwa avatar Feb 27 '18 11:02 iamonuwa

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 avatar Feb 28 '18 14:02 hjnp

@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 avatar Mar 19 '18 12:03 hjnp

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

hjnp avatar Mar 19 '18 12:03 hjnp

@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

hjnp avatar Mar 19 '18 18:03 hjnp

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

roblawford avatar Mar 22 '18 14:03 roblawford

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.

themounthead avatar Apr 01 '18 12:04 themounthead

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

hjnp avatar Apr 01 '18 12:04 hjnp

Thanks @hjnp @maiyaporn

iamonuwa avatar Apr 10 '18 14:04 iamonuwa

@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.

ParshuReddy avatar May 31 '18 04:05 ParshuReddy

any update about it please?

ynnr85 avatar Jun 04 '18 06:06 ynnr85

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

themounthead avatar Jun 05 '18 06:06 themounthead

Thanks @themounthead . This solved the issue.

argutierrez00 avatar Jun 14 '18 13:06 argutierrez00

@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.

RA344710 avatar Jul 17 '18 05:07 RA344710

@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.

themounthead avatar Jul 18 '18 11:07 themounthead

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?

joaolori avatar Jul 30 '18 07:07 joaolori

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.

RA344710 avatar Jul 30 '18 09:07 RA344710

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

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

hemanth-sp avatar Oct 09 '18 18:10 hemanth-sp

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

From: hemanth sp [mailto:[email protected]] Sent: Tuesday, October 9, 2018 1:24 PM To: maiyaporn/angular2-wizard [email protected] Cc: Rao, Baswant (Contractor) [email protected]; Comment [email protected] 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.

maddy81818181 avatar Oct 09 '18 18:10 maddy81818181

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

only two component source codes?

hemanth-sp avatar Oct 09 '18 18:10 hemanth-sp

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:[email protected]] Sent: Tuesday, October 9, 2018 1:34 PM To: maiyaporn/angular2-wizard [email protected] Cc: Rao, Baswant (Contractor) [email protected]; Comment [email protected] 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.

maddy81818181 avatar Oct 09 '18 18:10 maddy81818181

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

hemanth-sp avatar Oct 09 '18 19:10 hemanth-sp

Cool

From: hemanth sp [mailto:[email protected]] Sent: Tuesday, October 9, 2018 2:49 PM To: maiyaporn/angular2-wizard [email protected] Cc: Rao, Baswant (Contractor) [email protected]; Comment [email protected] 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.

maddy81818181 avatar Oct 09 '18 19:10 maddy81818181