angular - 离子服务:提供的值包含感叹号(!),这是不允许的,因为它是为加载程序语法保留的
问题描述
我正在尝试为 Ionic 运行以下简单的启动命令:
ionic serve
这应该启动一个为我的项目服务的开发服务器,但它会引发以下错误:
> ng.cmd run app:serve --host=localhost --port=810
[ng] Browserslist: caniuse-lite is outdated. Please run next command `npm update`
[ng] An unhandled exception occurred: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
[ng] - configuration.context: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] -> The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
[ng] - configuration.module.rules[13].include should be one of these:
[ng] RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? } | [RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
[ng] -> One or multiple rule conditions
[ng] Details:
[ng] * configuration.module.rules[10].include[0]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\theme\\variables.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[10].include[1]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\global.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[10].include[0]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\theme\\variables.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[10].include[1]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\global.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[11].include[0]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\theme\\variables.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[11].include[1]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\global.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[11].include[0]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\theme\\variables.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[11].include[1]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\global.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[12].include[0]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\theme\\variables.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[12].include[1]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\global.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[12].include[0]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\theme\\variables.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[12].include[1]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\global.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[13].include[0]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\theme\\variables.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[13].include[1]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\global.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[13].include[0]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\theme\\variables.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] * configuration.module.rules[13].include[1]: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\src\\global.scss" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] - configuration.output.path: The provided value "C:\\Users\\anton\\OneDrive\\Desktop\\Documentos!\\ionic\\03-componentes\\www" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
[ng] -> The output directory as **absolute path** (required).
[ng] See "C:\Users\anton\AppData\Local\Temp\ng-AnavB0\angular-errors.log" for further details.
[ERROR] ng has unexpectedly closed (exit code 127).
The Ionic CLI will exit. Please check any output above for error details.
有人可以告诉我这个错误是什么意思吗?
解决方案
输出日志清楚地指出
提供的值 "C:\Users\anton\OneDrive\Desktop\Documentos!\ionic\03-componentes\www" 包含不允许的感叹号 (!)。
删除!
文件夹中的Documentos!
推荐阅读
- wordpress - 在 wordpress 中创建隐藏的自定义帖子类型
- delphi - 如何获得 MessageDlg 中显示的那些图像?
- java - Android Studio - 多个蓝牙连接
- jquery - 如何将 jQuery HTML 字符串插入 HTML 文档
- javascript - 如何在与按钮相同的页面中显示表格?表格已经在另一个 html 文件中组成,所以我只是从那里拉出来
- kotlin - 如果verify()返回Mono.error(TheException()),如何避免调用get(id)方法
- bash - 在 Team City 中重击错误的日期格式
- java - 获取异常 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 ,同时使用 java 生成 excel 文件
- javascript - 如何使用另一个数据数组按 id 或名称过滤数据数组以显示在 React Table 中?
- vba - 访问 DLookUp 返回 Null