隔了一天,才发现是代码写错了

出错的原因是在ts 文件中使用这样的定义

data: [] = ['高新区', '经开区', '其他园区'];

错误在于这个定义的类型,不能是 [],修改成 any就没有问题了

data: any = ['高新区', '经开区', '其他园区'];

醉了


不知道怎么搞的,突然ionic报错: Failed to load resource 导致项目启动不起来

该问题的最终解决办法是,把git项目重新克隆了一遍。所以今天并没有找到错误的原因

记录解决过程

发现这些丢失的文件都是在build目录下的

所以执行build命令,但是报错如下:

这个错误搞不懂,没搜到解决办法,于是想先删除了node_modules,在安装
重新运行npm install命令 安装

结果报错:从github下载超时

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-57_binding.node": connect ETIMEDOUT 54.231.49.194:443

这里尝试了很多解决办法,终于可以下载了

但是再返回执行 build命令,还是报错,绝望了

[17:05:23]  ionic-app-script task: "build"
[17:05:23] Error: Debug Failure.
Error: Debug Failure.
at typeToString (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:28777:22)
at reportRelationError (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:34714:34)
at isRelatedTo (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:34860:21)
at checkTypeRelatedTo (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:34697:26)
at checkTypeAssignableTo (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:34398:20)
at checkVariableLikeDeclaration (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:44884:21)
at checkPropertyDeclaration (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:43383:13)
at checkSourceElement (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:46700:28)
at Object.forEach (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:1506:30)
at checkClassDeclaration (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:45765:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! guizhouApp@0.0.1 build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the guizhouApp@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in:
npm ERR! E:\jiashubing\npm_cache\_logs\2017-12-28T09_05_23_905Z-debug.log

ionic报错: Failed to load resource的更多相关文章

  1. 使用laravel-admin后台sdk报错Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID、Provisional headers are shown

    报错Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID请先确定自己的资源url是否可以确实访问到(地址正确与否.访问权限是否开启等) 若n ...

  2. Vue项目打包报错Failed to load resource: net::ERR_FILE_NOT_FOUND

    webpack.prod.conf.js 中output添加参数publicPath:'./' 修改webpack.base.conf.js中: publicPath: process.env.NOD ...

  3. 上传图片报错-Failed to load resource:the server responded with a status of 413(Request Entity Too Large)

    使用.netcore2.1 做文件上传时,要求是小于20M,上传3至5M都没问题,大于10M,提示错误[如标题],原来是nginx配置的原因 [HttpPost("Postcard" ...

  4. junit单元测试报错Failed to load ApplicationContext,但是项目发布到tomcat浏览器访问没问题

    junit单元测试报错Failed to load ApplicationContext,但是项目发布到tomcat浏览器访问没问题,说明代码是没问题的,配置也没问题.开始时怀疑是我使用junit版本 ...

  5. Eclipse启动 报错[Failed to load the JNI shared library jvm.dll

    准备要做java服务器,在安装开发环境时,启动Eclipse报错[Failed to load the JNI shared library jvm.dll] 研究了下,造成错误的原因是由于eclip ...

  6. 安卓预览报错 Failed to load AppCompat ActionBar with unknown error

    报错信息 : Render ProblemFailed to load AppCompat ActionBar with unknown error. Failed to instantiate on ...

  7. 使用elasticsearch启动项目报错failed to load elasticsearch nodes 。。。。。No type specified for field [name]

    failed to load elasticsearch nodes .....No type specified for field [name]翻译: 加载ElasticSearch节点失败... ...

  8. mesos-master启动失败,报错Failed to load unknown flag 'quorum.rpmsave'

    [现象] mesos启动失败,查看mesos状态报错: [root@hps102 ~]# systemctl status mesos-master ● mesos-master.service - ...

  9. Linux安装U盘启动报错Failed to load ldlinux.c32

    报错信息 使用U盘安装linux无法正常启动 Start booting from USB device... SYSLINUX 5.10 EDD 2013-06-04 Copyright (C) 1 ...

  10. Hive 报错 Failed to load class "org.slf4j.impl.StaticLoggerBinder".

    打开hive报错 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaultin ...

随机推荐

  1. Python-生成器_监听文件输入的例子_37

    def tail(filename): f = open(filename,encoding='utf-8') while True: line = f.readline() if line.stri ...

  2. 【学习总结】win7下安装Ubuntu双系统的日常

    参考文献 1 - [双系统中删除linux(win7适用) ] 2 - [win7(32位)U盘安装.卸载ubuntu(64位)双系统] 3 - [Windows下安装Ubuntu 16.04双系统] ...

  3. centos安装bundle文件

    centos安装VMware-Workstation-Full-*.bundle那点事 | 鳗鱼是条狗https://kinggoo.com/centos-vmware.htm Linux 下 VMW ...

  4. MySQL之数据导入导出

    日常开发中,经常会涉及到对于数据库中数据的导入与导出操作,格式也有很多: TXT,CSV,XLS,SQL等格式,所以,在此总结一下,省的总是百度查询. 一 导出 1) 常用的方式就是使用现成的工具例如 ...

  5. CMake--静态库与动态库构建

    小结内容 建立一个静态库和动态库,提供 HelloFunc 函数供其他程序编程使用, HelloFunc 向终端输出Hello World 字符串. 安装头文件与共享库. 1.代码与CMakeList ...

  6. css 别人找的css特效

    https://blog.csdn.net/m0_37809478/article/details/76619207

  7. CMD & Git Shell & Bash Shell

    CMD & Git Shell & Bash Shell https://mvdan.cc/sh/cmd/shfmt PC

  8. 初识Xml。

    /* * 一.Xml? * * 1.是什么? * Extensible markup Language 可拓展标记性语言 * 功能是 储存数据 * 1.配置文件 * 2.在网络中传输数据 * xml和 ...

  9. mysql数据库,安装 !创建!...详解!

    package cn.jiayou; /* 一.mysql? a.MySQL是Web世界中使用最广泛的数据库服务器. SQLite的特点? 1.是轻量级.可嵌入,但不能承受高并发访问,适合桌面和移动应 ...

  10. java、二维数组详解!

    /* java 二维数组的概念 使用方法! 1.什么是二维数组? 答案:数组的数组! 他的每一个元素都是数组!二维数组是(存储一维数组的)一维数组. 2.如何定义?(以二维数组为列) int arr[ ...