I am using Moment.js in my custom angular library. I used to import it in library like that:
import * as moment_ from 'moment'; const moment = moment_;
I have local playground where I build it and check for errors. Everything works. But after uploading it to NPM and upgrading to version with moment.js in my main project - I got this type error:
库配置: Angular 版本:13.3.10 Moment.js:2.29.3
项目配置: Angular 版本:13.5.0 Moment.js:2.29.3
我试过用不同的方法导入它(例如,从Moment导入*as Moment),并多次重建它,但都没有成功. 有人猜猜是什么导致了这个错误吗?