Vai*_*pal 5 leaflet leaflet.draw angular ngx-leaflet ngx-leaflet-draw
\n\n导入没有 \xc9\xb5mod 属性的 LeafletDrawModule
\n
我在单元测试期间看到此错误(开玩笑)。
\n当我运行 ng 应用程序时,代码运行良好。传单绘制功能完美运行。
\nAngular: 11\n@asymmetrik/ngx-leaflet: 8.1.0\n@asymmetrik/ngx-leaflet-draw: 7.0.0\nRun Code Online (Sandbox Code Playgroud)\n当单元测试引用 LeafletDrawModule 的组件时会发生此错误
\n终于找到了解决办法。
在模块文件夹上运行后,ngcc问题自行解决。
如果您收到ngcc' is not recognize as a inside or external command,则说明您尚未在PATH. 你可以从执行它[project_path]\node_modules\.bin\ngcc
或者
如果您在 package.json 中配置了 postinstall,
"scripts": {
.
"postinstall": "ngcc",
.
}
Run Code Online (Sandbox Code Playgroud)
跑步npm run postintall。
| 归档时间: |
|
| 查看次数: |
4790 次 |
| 最近记录: |