Visual Studio 代码、tslint 和虚拟机
Visual Studio Code, tslint and virtual machine
我正在计算机上使用 Visual Studio 代码来开发项目 (angular)。我项目的文件位于虚拟机上。
Visual Studio 代码工作正常,我可以毫无问题地编辑我的文件,但我看不到 tslint 错误。我想通过在 Visual Studio 代码中使用 "ng lint" 命令(通过 Putty)在我的虚拟机上修复我看到的所有 tslint 错误。
当我尝试向 Visual Studio 代码终端启动命令时,出现错误:
PS Microsoft.PowerShell.Core\FileSystem::\192.168.0.141\Work\MyProject> ng lint
ng : Le terme «ng» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès
est correct et réessayez.
Au caractère Ligne:1 : 1
+ ng build
+ ~~
+ CategoryInfo : ObjectNotFound: (ng:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
或使用此命令
./node_modules/@angular/cli/bin/ng
// 它在记事本中打开一个文件...
如果我通过 Putty 运行 这些命令,它会起作用。
目标是使用 lint 命令来修复我项目中的每个文件(或者,通过模块来完成)。我有点迷茫,不知道该怎么办。
有什么想法吗?
非常感谢
编辑:
Info - 15:21:37] vscode-tslint: Cannot read tslint configuration - 'ENOENT: no such file or directory, scandir '\192.168.0.141\work\work\myProject\src\app\testModule\services
路径不好,哪里可以修改?
The path is not good, where can I change this ?
尝试更改 tslint.configFile
Visual Studio 代码设置。您可以通过转到文件 -> 首选项 -> 设置并在搜索框中键入名称来找到它。
我正在计算机上使用 Visual Studio 代码来开发项目 (angular)。我项目的文件位于虚拟机上。
Visual Studio 代码工作正常,我可以毫无问题地编辑我的文件,但我看不到 tslint 错误。我想通过在 Visual Studio 代码中使用 "ng lint" 命令(通过 Putty)在我的虚拟机上修复我看到的所有 tslint 错误。
当我尝试向 Visual Studio 代码终端启动命令时,出现错误:
PS Microsoft.PowerShell.Core\FileSystem::\192.168.0.141\Work\MyProject> ng lint
ng : Le terme «ng» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès
est correct et réessayez.
Au caractère Ligne:1 : 1
+ ng build
+ ~~
+ CategoryInfo : ObjectNotFound: (ng:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
或使用此命令
./node_modules/@angular/cli/bin/ng
// 它在记事本中打开一个文件...
如果我通过 Putty 运行 这些命令,它会起作用。
目标是使用 lint 命令来修复我项目中的每个文件(或者,通过模块来完成)。我有点迷茫,不知道该怎么办。
有什么想法吗?
非常感谢
编辑:
Info - 15:21:37] vscode-tslint: Cannot read tslint configuration - 'ENOENT: no such file or directory, scandir '\192.168.0.141\work\work\myProject\src\app\testModule\services
路径不好,哪里可以修改?
The path is not good, where can I change this ?
尝试更改 tslint.configFile
Visual Studio 代码设置。您可以通过转到文件 -> 首选项 -> 设置并在搜索框中键入名称来找到它。