在 angular 项目中需要一个 dojo 模块

问题描述

我正在将 Dojo 模块导入 Angular 项目。我在项目的 node_modules 下安装了 Dojo、Dijit 和 Dojox,以及 dojo-typings。在打字稿文件 dojo/parser 中使用的是这样的:

import * as parser from 'dojo/parser'

但是编译总是报错:

Error: ./node_modules/dojo/on.js
Module not found: Error: Can't resolve 'dom-addeventlistener?:./aspect' in 'node_modules/dojo'

"./has!dom-addeventlistener?:./aspect" is required in on.js,looks it did not recognize the has plugin and conditional loading.

我还尝试在 ts 文件中添加 loader.d.ts 的引用路径并使用

require('dojo/parser')

但错误仍然存​​在。

有人遇到过类似的问题并且知道如何解决这个问题吗?谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...