fingerpich / jalali-moment

Display, parse, manipulate, validate and convert jalali (Persian, Khorshidi, Shamsi) or Gregorian (Miladi) dates and times.
https://fingerpich.github.io/jalali-moment/
MIT License
435 stars 68 forks source link

failed to build angular project which using jalali-moment package #51

Closed behzadjj closed 5 years ago

behzadjj commented 5 years ago

Once i use this package in an angular project and run build command it show error as follow:

BUILD ERROR Cannot call a namespace ('moment') Error: Cannot call a namespace ('moment') at error (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:199:15) at Module.error (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:17170:9) at CallExpression.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:14725:30) at MemberExpression$$1.NodeBase.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:13499:23) at MemberExpression$$1.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:15672:35) at CallExpression.NodeBase.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:13499:23) at CallExpression.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:14721:31) at AssignmentExpression.NodeBase.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:13499:23) at AssignmentExpression.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:14605:31) at ExpressionStatement$$1.NodeBase.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:13499:23)

Cannot call a namespace ('moment') Error: Cannot call a namespace ('moment') at error (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:199:15) at Module.error (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:17170:9) at CallExpression.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:14725:30) at MemberExpression$$1.NodeBase.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:13499:23) at MemberExpression$$1.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:15672:35) at CallExpression.NodeBase.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:13499:23) at CallExpression.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:14721:31) at AssignmentExpression.NodeBase.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:13499:23) at AssignmentExpression.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:14605:31) at ExpressionStatement$$1.NodeBase.bind (D:\angular-pro\libraries\node_modules\rollup\dist\rollup.js:13499:23)

Date adapter want to use jalali moment in angular material date picker. 1.I run an angular project with : ng new my-app 2.Then import jalali moment package 3.Create an adapter for date.

Guide for using this adapter can found in : jalali-date-picker

Where is the problem?

fingerpich commented 5 years ago

duplicate with #50