\n\n类型“typeof import("/home/thrymr/Desktop/ILMCT 2/ilmct-frontend/node_modules/@angular/core/index")”上不存在属性“\xc9\xb5unwrapWritableSignal”。
\n
项目已成功编译并运行,但无论我在[(ngModel)]. 原因是什么以及如何消除此错误?
我尝试了一切,比如卸载我的 vs code 并再次安装,再次克隆项目。使用 Angular 版本为 14,Node.js 版本为 18
\n\n\n版主注:这似乎是最新版本的 Angular Language IDE 扩展中的一个错误。请不要添加仅指向该错误或告诉人们降级的新答案。
\n
不知何故,VSCode 中的 Angular (v11.0.4) 语言服务不再起作用。我收到以下错误消息。:
[Info - 17:52:04] Angular language server process ID: 147359
[Info - 17:52:04] Using typescript/lib/tsserverlibrary v4.0.5 from ~/.vscode-oss/extensions/angular.ng-template-0.1100.2/node_modules/typescript/lib/tsserverlibrary.js
[Info - 17:52:04] Using @angular/language-service v11.0.3 from ~/.vscode-oss/extensions/angular.ng-template-0.1100.2/server/node_modules/@angular/language-service/bundles/language-service.js
[Info - 17:52:04] Log file: ~/.config/Code - OSS/logs/20210112T090839/exthost2/Angular.ng-template/nglangsvc.log
[Info - 17:52:06] Disabling language service for ~/Workspace/NG_PROJECT/tsconfig.json because it is not an Angular project ('@angular/core/core.d.ts' could not be found). If you believe you are seeing this message in error, please reinstall the packages in your package.json.
[Error - 17:52:06] Failed to …Run Code Online (Sandbox Code Playgroud) tsconfig visual-studio-code angular angular-language-service angular11
由于我们将代码库升级到 Angular 11,我在 VSCode 中收到了这条消息:
某些语言功能不可用。要访问所有功能,请
strictTemplates在angularCompilerOptions.来源:Angular 语言服务(扩展)
带有“打开 tsconfig.json”的链接,如下所示:
我期待启用此功能并享受新功能。但我想抽出时间来做和测试这个。就目前而言,VSCode 中的弹出窗口一直不断出现,这很烦人和分心。
我如何(现在)抑制此消息,最好是针对我当前的工作区?
angular.ng-template) v11.2.3在上次更新后的 Visual Studio Code 编辑器中,我在状态栏中看到此文本:
Angular: Running ngcc for project d:/..../tsconfig.spec.json
它看起来像冻结或什么都不做,只是旋转箭头。
在这篇文章之前,我看到了一个类似的tscfonfig.json结尾......
由于此文本显示在状态中,我的 vscode 存在一些性能问题……它变得非常非常缓慢。有时,快速导入(ctrl-space)通常不起作用,找不到类,在此更新之前运行良好的接口。
这是什么?这是必要的还是我可以以某种方式关闭?这可能是插件错误吗?
visual-studio-code angular angular-language-service angular10
我目前的设置如下:
local cwd = vim.fn.getcwd()
local project_library_path = cwd .. "/node_modules"
local cmd = {
DATA_PATH .. "/lsp_servers/angularls/node_modules/@angular/language-server/bin/ngserver",
"--ngProbeLocations",
project_library_path,
"--tsProbeLocations",
project_library_path ,
"--stdio",
}
require'lspconfig'.angularls.setup{
cmd = cmd,
on_new_config = function(new_config, new_root_dir)
new_config.cmd = cmd
end
}
Run Code Online (Sandbox Code Playgroud)
在 上:LspInfo,我可以看到它cmd是可执行的,但不知何故它没有附加。
我很难@angular/language-server区分@angular/language-service...
我不确定 和 会做什么tsProbeLocations以及ngProbeLocations我的道路是否正确。
最后,我从Angular Language Service 网站上看到,neovim 没有一个好的指南。(除了coc-angular,但我不使用 coc。)
neovim angular language-server-protocol angular-language-service
我有一个pipesModuleAngular库项目,当我将模块导入到另一个项目时,出现错误提示:Unable to resolve signature for pipe invocation在 vs code 中,它仍然有效,构建没有错误,但我不知道如何修复它,我有很多红线...
现在,升级后错误提示发生了变化,如下所示: Unable to resolve signature for call of pipeName,但我认为这意味着同样的事情
每个管道都会出现此错误,我无法忍受红线...,但可以通过 webstorm 解决。
\n\n
仅此而已,还有什么问题吗?
\n\nAngular Library Project\n\xe2\x94\x9c\xe2\x94\x80src\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80pipes\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80hide-tel.pipe.ts\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80pipes.module.ts\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80index.ts\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80public_api.ts\n...\nRun Code Online (Sandbox Code Playgroud)\n\nAngular Library Project\n\xe2\x94\x9c\xe2\x94\x80src\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80pipes\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80hide-tel.pipe.ts\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80pipes.module.ts\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80index.ts\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80public_api.ts\n...\nRun Code Online (Sandbox Code Playgroud)\n\nimport {Pipe, PipeTransform} from \'@angular/core\';\n\n@Pipe({\n name: \'hideTel\'\n})\nexport class HideTelPipe implements …Run Code Online (Sandbox Code Playgroud) 我收到这个错误
属性绑定 ngIf 未被嵌入模板上的任何指令使用。确保属性名称拼写正确并且所有指令都列在“@NgModule.declarations”中
即使你在我跑步时也能正常工作ng serve。
当我将 Angular 更新为v13.
我已经尝试重新启动Vscode并重新安装Angular Language Service并安装以前版本的Angular Language Service ...它们都不起作用..
我的app.module.ts:
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [CommonModule, BrowserModule, AppRoutingModule],
providers: [],
bootstrap: [AppComponent],
exports: [CommonModule, BrowserModule],
})
export class AppModule {}
Run Code Online (Sandbox Code Playgroud) 我在 Anuglar v4 上安装了 Angular 语言服务扩展和它的 VS 代码包,既没有在 HTML 中获得任何智能感知,也没有在 VS 代码开发工具中获得任何错误。
我有一个较旧的 angular 项目,其中已经制作了一些组件。angular 语言服务不适用于使用 cli 生成的新组件,
但是,如果您查看几天前生成的同一项目中的另一个组件,它会起作用:
[![工作][1]](https://i.stack.imgur.com/9qFED.png)
我认为这是一个 IVY 问题,所以我继续在 angular.json 中禁用 AOT 并在我的 ts 配置中添加了“enableIvy”:false,这是这些文件:
Angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"frontend": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/frontend",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": false,
"assets": ["src/favicon.ico", "src/assets"],
"styles": [
"src/styles.scss",
"node_modules/material-design-icons/iconfont/material-icons.css"
],
"scripts": …Run Code Online (Sandbox Code Playgroud)