Closed anouarcharif closed 7 years ago
I can't reproduce that. What version of angular and typescript are you using? Could you provide your app.module.ts and the file(s) in which you are importing EventsModule?
Hello,
When i try to import the definition for my app.module like that:
import { EventsModule } from 'angular4-events';
Cannot find module 'angular4-events'.
Here's my env:
@angular/cli: 1.4.9
node: 8.6.0
os: darwin x64
@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/cli: 1.4.9
@angular/compiler-cli: 4.4.6
@angular/language-service: 4.4.6
typescript: 2.3.4
Have you downloaded the module (npm install --save angular4-events
)? If you run npm list --depth=0
, it should appear as "angular4-events@4.0.1".
Yes it's installed:
npm list --depth=0 ├── @angular/animations@4.4.6 ├── @angular/cli@1.4.9 ├── @angular/common@4.4.6 ├── @angular/compiler@4.4.6 ├── @angular/compiler-cli@4.4.6 ├── @angular/core@4.4.6 ├── @angular/forms@4.4.6 ├── @angular/http@4.4.6 ├── @angular/language-service@4.4.6 ├── @angular/platform-browser@4.4.6 ├── @angular/platform-browser-dynamic@4.4.6 ├── @angular/router@4.4.6 ├── @types/jasmine@2.5.54 ├── @types/jasminewd2@2.0.3 ├── @types/node@6.0.90 ├── angular-2-local-storage@1.0.1 ├── angular4-events@4.0.1 ├── codelyzer@3.2.2 ├── core-js@2.5.1 ├── jasmine-core@2.6.4 ├── jasmine-spec-reporter@4.1.1 ├── karma@1.7.1 ├── karma-chrome-launcher@2.1.1 ├── karma-cli@1.0.1 ├── karma-coverage-istanbul-reporter@1.3.0 ├── karma-jasmine@1.1.0 ├── karma-jasmine-html-reporter@0.2.2 ├── protractor@5.1.2 ├── rxjs@5.5.2 ├── ts-node@3.2.2 ├── tslint@5.7.0 ├── typescript@2.3.4 └── zone.js@0.8.18
I just tried to create a test app:
ng new TestApp
cd TestApp
npm install --save angular4-events
Adding the following lines to src/app/app.module.ts does not throw any error:
import { EventsModule } from 'angular4-events';
...
@NgModule({
imports: [
...
EventsModule.forRoot()
]
})
Could you try to do the same?
Hello,
Here what i do:
npm install --save angular4-events `
and
@NgModule({ imports: [ ... EventsModule.forRoot() ] })
I did the same thing again, and now it work 🗡
Thank you
Great, I'm glad it works!
Hello,
I tried to use your plugin, but it's not working ...
ERROR in Error: Error encountered resolving symbol values statically. Could not resolve angular4-events relative to