javascript-错误:.css 中的加载程序未在 Angular 12.1.1 中返回字符串
发布时间:2022-08-23 19:52:03 369
相关标签: # 前端
我创建了一个新项目,但每当我编译时,都会收到以下2条错误消息:
错误:找不到模块:错误:无法解析“C:/Users/Avishek/Documents/practice/frontend/src/app/pages/admin/authentication/authentication”。组成部分C:\Users\Avishek\Documents\practice\frontend中的css
和
错误:加载程序“;C: /Users/Avishek/Documents/practice/frontend/src/app/pages/admin/authentication/authentication。组成部分css“;未返回字符串。
我从来没有遇到过这种类型的问题,甚至在几天前,我创建了一个项目,但仍然没有得到相同的角度版本。下面是我的tsconfig.json
&;package.json
文件。
tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": false,
"noImplicitReturns": false,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2017",
"module": "es2020",
"lib": [
"es2018",
"dom"
],
"paths": {
"@directive/*": ["src/app/core/directives/*"],
"@guard/*": ["src/app/core/guards/*"],
"@interceptor/*": ["src/app/core/interceptors/*"],
"@pipe/*": ["src/app/core/pipes/*"],
"@service/*": ["src/app/core/services/*"],
"@custom-validator/*": ["src/app/core/validators/*"],
"@model/*": ["src/app/core/models/*"],
"@store/*": ["src/app/core/store/*"],
"@feature/*": ["src/app/features/*"],
"@page/*": ["src/app/pages/*"],
"@shared/*": ["src/app/shared/*"]
}
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true,
"strictPropertyInitialization": false
}
}
package.json
{
"name": "project",
"version": "1.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "~12.1.1",
"@angular/cdk": "^12.2.4",
"@angular/common": "~12.1.1",
"@angular/compiler": "~12.1.1",
"@angular/core": "~12.1.1",
"@angular/forms": "~12.1.1",
"@angular/material": "^12.2.4",
"@angular/platform-browser": "~12.1.1",
"@angular/platform-browser-dynamic": "~12.1.1",
"@angular/router": "~12.1.1",
"@kolkov/angular-editor": "^1.2.0",
"@ngxs/store": "^3.7.2",
"rxjs": "~6.6.0",
"tslib": "^2.2.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.1.1",
"@angular/cli": "~12.1.1",
"@angular/compiler-cli": "~12.1.1",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.11.1",
"jasmine-core": "~3.8.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"typescript": "~4.3.2"
}
}
请帮助了解这是什么类型的问题,以及我如何解决它。
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报