Skip to content

Wrong error diagnostics message 'Cannot find module xxxx'  #30422

Closed
@mmorhun

Description

TypeScript Version: 3.4.0-dev.20190315

Search Terms:

Cannot find module, wrong message

Steps to reproduce

  1. Create a new workspace (empty folder). Create subfolder test-plugin in it.

  2. Install npm install -g yo @theia/generator-plugin

  3. 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
    |- ...
  1. 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() { }
  1. Build the project using yarn command

  2. 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'

Screen Shot 2019-03-14 at 15 18 04

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions