I am having the same issue on Win7 using a freshly created angluar-cli
project. I have executed these commands:
typings install moment --ambient --save
npm i moment --save
npm i ng2-bootstrap --save
npm install
But I am still getting the following error, the actual application tries to
use Alert like this:
<alert type="info">ng2-bootstrap hello world!</alert>
Error: [DiffingTSCompiler]: Typescript found the following errors:
c:/Users/kovax/workspace/ng2test/typings/browser/ambient/moment/moment.d.ts
(9, 21): Cannot find namespace 'moment'.
node_modules/ng2-bootstrap/components/datepicker/date-formatter.ts (1,
25): Cannot find module 'moment'.
at DiffingTSCompiler.doFullBuild
(c:\Users\kovax\workspace\ng2test\node_modules\angular-cli\lib\broccoli\broccoli-typescript.js:202:29)
at DiffingTSCompiler.rebuild
(c:\Users\kovax\workspace\ng2test\node_modules\angular-cli\lib\broccoli\broccoli-typescript.js:129:22)
at DiffingPluginWrapper.rebuild
(c:\Users\kovax\workspace\ng2test\node_modules\angular-cli\lib\broccoli\diffing-broccoli-plugin.js:87:45)
at
c:\Users\kovax\workspace\ng2test\node_modules\angular-cli\node_modules\angular-cli\node_modules\broccoli\lib\api_compat.js:42:21
at lib$rsvp$$internal$$tryCatch
(c:\Users\kovax\workspace\ng2test\node_modules\angular-cli\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback
(c:\Users\kovax\workspace\ng2test\node_modules\angular-cli\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1048:17)
at
c:\Users\kovax\workspace\ng2test\node_modules\angular-cli\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:331:11
at lib$rsvp$asap$$flush
(c:\Users\kovax\workspace\ng2test\node_modules\angular-cli\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1198:9)
at nextTickCallbackWith0Args (node.js:433:9)
at process._tickCallback (node.js:362:13)
Any help would be much appreciated!
Zsolt
On 23 February 2016 at 12:45, Adnan Salahuddin <[email protected]>
wrote:
> Hi folks,
>
> I am using asp.net 5. I add import {BUTTON_DIRECTIVES} from
> 'ng2-bootstrap/ng2-bootstrap';
> I am getting error message and it says: Cannot find module 'moment'.
>
> I think i have already install package in pakage.json:
>
> "dependencies": {
> "angular2": "2.0.0-beta.3",
> "es6-promise": "3.0.2",
> .......................................
>
> * "ng2-bootstrap": "1.0.3", "moment": "2.11.2"*
> },
> "devDependencies": {
> ..................................
> "gulp-uglify": "1.2.0",
> "rimraf": "2.2.8",
> "typescript": "1.8.2"
> }
>
> What am i missing?
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.