Wrong error diagnostics message 'Cannot find module xxxx' #30422
Closed
Description
opened on Mar 15, 2019
TypeScript Version: 3.4.0-dev.20190315
Search Terms:
Cannot find module
, wrong message
Steps to reproduce
-
Create a new workspace (empty folder). Create subfolder
test-plugin
in it. -
Install
npm install -g yo @theia/generator-plugin
-
Generate a frontend plug-in:
yo @theia/plugin
. So, the folders structure should be as following:
ws-root
|- test-plugin
|- dist
|- src
| |- test-plugin-frontend.ts
|- node_modules
| |- ...
|- package.json
|- tsconfig.json
|- ...
- Open
test-plugin-frontend.ts
and paste the following content:
import * as theia from '@theia/plugin';
export function start(context: theia.PluginContext) {
theia.window.onDidChangeVisibleTextEditors((editors: theia.TextEditor[]) => {
let list: string = '';
for (let editor of editors) {
list += editor.document.uri.toString() + ', ';
}
console.log(list);
});
// theia.window.onDid
}
export function stop() { }
-
Build the project using
yarn
command -
Uncomment the commented line. Change a few symbols and comment it again (Use
Ctrl + /
shortcut). Save the editor content.
Expected behavior:
No error diagnostic message, nothing has changed actually.
Actual behavior:
Error diagnostic message is appeared on the @theia/plugin
import: [typescript] Cannot find module '@theia/plugin'
Activity