JavadRasouli / ng2-permission

permission based access control for your angular2 applications.
MIT License
53 stars 19 forks source link

index.ts is missing from the TypeScript compilation #12

Open mastanmoka opened 6 years ago

mastanmoka commented 6 years ago

After installing the angular2-permissions, we added as follows in pages.module.ts

@NgModule({ imports: [ Ng2Permission ]

providers: [PermissionService, PermissionHelper, PermissionGuard] then ng serve its giving compile error.

ERROR in ./node_modules/angular2-permission/index.ts Module build failed: Error: .......\node_modules\angular2-permission\index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

ERROR in ./node_modules/angular2-permission/src/services/permission-helper.service.ts Module build failed: .......\node_modules\angular2-permission\src\services\permission-helper.service.ts is missing from the TypeScript compilation.

How to resolve it.

We use angular 4 and angular cli v1.7.2

rodrigoporcionato commented 6 years ago

same error for me

daliri72 commented 6 years ago

same error for me

MSkred commented 6 years ago

same error for me

drAliRahnema commented 4 years ago

ERROR in ./node_modules/angular2-permission/index.ts Module build failed (from ./node_modules/@ngtools/webpack/src/index.js): Error:/node_modules/angular2-permission/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 (/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:935:23) at /node_modules/@ngtools/webpack/src/loader.js:42:31 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:94:5)