发行版和CLI的aurelia-dialog错误 [英] aurelia-dialog error with the release version and CLI

查看:91
本文介绍了发行版和CLI的aurelia-dialog错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用新的aurelai版本时,我遇到了一个问题:

I'm facing a problem when using the new aurelai release :

  • 我使用以下命令创建了一个新应用:au new myApp
  • 我通过npm安装了aurelia-dialog
  • 当我导入aurelia-dialog并尝试使用
  • 运行该应用程序时
  • I created a new app using : au new myApp
  • I installed aurelia-dialog via npm
  • When I import aurelia-dialog and try to run the app using

au run --watch

我得到htis错误:

[错误:ENOENT:没有这样的文件或目录,请打开'C:\ src \ ai-dialog.js']

[Error: ENOENT: no such file or directory, open 'C:\src\ai-dialog.js']

有什么主意吗?

推荐答案

发生这种情况的原因是该程序包是CommonJS程序包.

The reason this is happening is because the package is a CommonJS package.

请参阅: http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/the-aurelia-cli/10

"dependencies": [
    "aurelia-dialog"
]

"dependencies": [
    {
        "name": "aurelia-dialog",
        "path": "../node_modules/aurelia-dialog/dist/amd",
        "main": "aurelia-dialog"
    }
]

那应该可以解决您的问题.

and that should solve your problem.

这篇关于发行版和CLI的aurelia-dialog错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆