在IIS上托管离子3应用程序?

时间:2018-05-24 07:18:29

标签: iis ionic-framework ionic3

我在IIS上部署我的应用程序,但它无法运行。我正在做的是运行命令ionic build browser并在IIS上托管www文件夹。当我运行托管网站时,我收到两个错误。一个是找不到cordova.js而另一个是我的服务中的对象(....)不是函数。我尝试了很多东西,但它没有用。以下是我在brwoser控制台上遇到的错误:

cordova.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
event-service.ts:6 Uncaught TypeError: Object(...) is not a function
    at Object.605 (event-service.ts:6)
    at __webpack_require__ (bootstrap b338a5eb2d97a44eede9:54)
    at Object.37 (index.ts:1)
    at __webpack_require__ (bootstrap b338a5eb2d97a44eede9:54)
    at Object.157 (index.ts:1)
    at __webpack_require__ (bootstrap b338a5eb2d97a44eede9:54)
    at Object.exports.isScheduler (ArrayObservable.js:8)
    at __webpack_require__ (bootstrap b338a5eb2d97a44eede9:54)
    at Object.exports.isArrayLike (merge.js:3)
    at __webpack_require__ (bootstrap b338a5eb2d97a44eede9:54)

任何人都能说出我错过了什么,或者我做错了什么?

2 个答案:

答案 0 :(得分:2)

尝试使用cordova运行项目:

  

离子cordova运行浏览器

构建项目:

  

离子cordova构建浏览器

答案 1 :(得分:0)

重新安装节点并删除node_modules并运行npm install解决了这个问题。

相关问题