Emmet Extension not wokring

I configured Emmet extension in my docker, but the extension is not working properly. throw an issue in the console.

[original thread by Bineesh P B]

hello @bineesh-p-b could you report the issue of the console, the version of Theia that you’re using, the version of Emmet extension etc.

[Bineesh P B]

here is the console error
editor.main.js:158 Uncaught Error: Cannot read property ‘items’ of undefined

TypeError: Cannot read property ‘items’ of undefined
at editor.main.js:2056
at Object.g [as _notify] (editor.main.js:141)
at Object.enter (editor.main.js:145)
at n.Class.derive._creator._run (editor.main.js:146)
at n.Class.derive._creator._completed (editor.main.js:146)
at Object.g [as _notify] (editor.main.js:141)
at Object.enter (editor.main.js:145)
at n.Class.derive._oncancel._run (editor.main.js:146)
at n.Class.derive._oncancel._completed (editor.main.js:146)
at Object.g [as _notify] (editor.main.js:141)
at editor.main.js:158

[Bineesh P B]

this is the pakage.json i am using

{
“private”: true,
“dependencies”: {
@theia/preview”: “next”,
@theia/editor-preview”: “next”,
“vscode-languageclient”:“next”,
“typescript”: “latest”,
@theia/core”: “next”,
@theia/editor”: “next”,
@theia/editorconfig”: “next”,
@theia/file-search”: “next”,
@theia/filesystem”: “next”,
@theia/git”: “next”,
@theia/json”: “next”,
@theia/plugin-ext”: “next”,
@theia/plugin-ext-vscode”: “next”,
@theia/keymaps”: “next”,
@theia/languages”: “next”,
@theia/markers”: “next”,
@theia/merge-conflicts”: “next”,
@theia/messages”: “next”,
@theia/mini-browser”: “next”,
@theia/monaco”: “next”,
@theia/navigator”: “next”,
@theia/outline-view”: “next”,
@theia/php”: “next”,
@theia/output”: “next”,
@theia/preferences”: “next”,
@theia/process”: “next”,
@theia/search-in-workspace”: “next”,
@theia/task”: “next”,
@theia/terminal”: “next”,
@theia/textmate-grammars”: “next”,
@theia/tslint”: “next”,
@theia/typescript”: “next”,
@theia/userstorage”: “next”,
@theia/workspace”: “next”
},
“resolutions”: {
“onigasm”: “2.2.1”,
“vscode-uri”:
},
“devDependencies”: {
@theia/cli”: “next”
},
“scripts”: {
“postinstall”: “download-debug-adapters”
},
“adapterDir”: “plugins”,
“adapters”: {
“vscode-go”: “https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/Go/0.9.2/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
}
}

[Bineesh P B]

this is the pakage.json i am using

{
“private”: true,
“dependencies”: {
@theia/preview”: “next”,
@theia/editor-preview”: “next”,
“vscode-languageclient”:“next”,
“typescript”: “latest”,
@theia/core”: “next”,
@theia/editor”: “next”,
@theia/editorconfig”: “next”,
@theia/file-search”: “next”,
@theia/filesystem”: “next”,
@theia/git”: “next”,
@theia/json”: “next”,
@theia/plugin-ext”: “next”,
@theia/plugin-ext-vscode”: “next”,
@theia/keymaps”: “next”,
@theia/languages”: “next”,
@theia/markers”: “next”,
@theia/merge-conflicts”: “next”,
@theia/messages”: “next”,
@theia/mini-browser”: “next”,
@theia/monaco”: “next”,
@theia/navigator”: “next”,
@theia/outline-view”: “next”,
@theia/php”: “next”,
@theia/output”: “next”,
@theia/preferences”: “next”,
@theia/process”: “next”,
@theia/search-in-workspace”: “next”,
@theia/task”: “next”,
@theia/terminal”: “next”,
@theia/textmate-grammars”: “next”,
@theia/tslint”: “next”,
@theia/typescript”: “next”,
@theia/userstorage”: “next”,
@theia/workspace”: “next”
},
“resolutions”: {
“onigasm”: “2.2.1”,
“vscode-uri”:
},
“devDependencies”: {
@theia/cli”: “next”
},
“scripts”: {
“postinstall”: “download-debug-adapters”
},
“adapterDir”: “plugins”,
“adapters”: {
“vscode-go”: “https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/Go/0.9.2/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
}
}

[Bineesh P B]

this is the pakage.json i am using

{
“private”: true,
“dependencies”: {
@theia/preview”: “next”,
@theia/editor-preview”: “next”,
“vscode-languageclient”:“next”,
“typescript”: “latest”,
@theia/core”: “next”,
@theia/editor”: “next”,
@theia/editorconfig”: “next”,
@theia/file-search”: “next”,
@theia/filesystem”: “next”,
@theia/git”: “next”,
@theia/json”: “next”,
@theia/plugin-ext”: “next”,
@theia/plugin-ext-vscode”: “next”,
@theia/keymaps”: “next”,
@theia/languages”: “next”,
@theia/markers”: “next”,
@theia/merge-conflicts”: “next”,
@theia/messages”: “next”,
@theia/mini-browser”: “next”,
@theia/monaco”: “next”,
@theia/navigator”: “next”,
@theia/outline-view”: “next”,
@theia/php”: “next”,
@theia/output”: “next”,
@theia/preferences”: “next”,
@theia/process”: “next”,
@theia/search-in-workspace”: “next”,
@theia/task”: “next”,
@theia/terminal”: “next”,
@theia/textmate-grammars”: “next”,
@theia/tslint”: “next”,
@theia/typescript”: “next”,
@theia/userstorage”: “next”,
@theia/workspace”: “next”
},
“resolutions”: {
“onigasm”: “2.2.1”,
“vscode-uri”:
},
“devDependencies”: {
@theia/cli”: “next”
},
“scripts”: {
“postinstall”: “download-debug-adapters”
},
“adapterDir”: “plugins”,
“adapters”: {
“vscode-go”: “https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/Go/0.9.2/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
}
}

[Bineesh P B]

this is the pakage.json i am using

{
“private”: true,
“dependencies”: {
@theia/preview”: “next”,
@theia/editor-preview”: “next”,
“vscode-languageclient”:“next”,
“typescript”: “latest”,
@theia/core”: “next”,
@theia/editor”: “next”,
@theia/editorconfig”: “next”,
@theia/file-search”: “next”,
@theia/filesystem”: “next”,
@theia/git”: “next”,
@theia/json”: “next”,
@theia/plugin-ext”: “next”,
@theia/plugin-ext-vscode”: “next”,
@theia/keymaps”: “next”,
@theia/languages”: “next”,
@theia/markers”: “next”,
@theia/merge-conflicts”: “next”,
@theia/messages”: “next”,
@theia/mini-browser”: “next”,
@theia/monaco”: “next”,
@theia/navigator”: “next”,
@theia/outline-view”: “next”,
@theia/php”: “next”,
@theia/output”: “next”,
@theia/preferences”: “next”,
@theia/process”: “next”,
@theia/search-in-workspace”: “next”,
@theia/task”: “next”,
@theia/terminal”: “next”,
@theia/textmate-grammars”: “next”,
@theia/tslint”: “next”,
@theia/typescript”: “next”,
@theia/userstorage”: “next”,
@theia/workspace”: “next”
},
“resolutions”: {
“onigasm”: “2.2.1”,
“vscode-uri”:
},
“devDependencies”: {
@theia/cli”: “next”
},
“scripts”: {
“postinstall”: “download-debug-adapters”
},
“adapterDir”: “plugins”,
“adapters”: {
“vscode-go”: “https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/Go/0.9.2/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
}
}

[Bineesh P B]

this is the pakage.json i am using

{
“private”: true,
“dependencies”: {
@theia/preview”: “next”,
@theia/editor-preview”: “next”,
“vscode-languageclient”:“next”,
“typescript”: “latest”,
@theia/core”: “next”,
@theia/editor”: “next”,
@theia/editorconfig”: “next”,
@theia/file-search”: “next”,
@theia/filesystem”: “next”,
@theia/git”: “next”,
@theia/json”: “next”,
@theia/plugin-ext”: “next”,
@theia/plugin-ext-vscode”: “next”,
@theia/keymaps”: “next”,
@theia/languages”: “next”,
@theia/markers”: “next”,
@theia/merge-conflicts”: “next”,
@theia/messages”: “next”,
@theia/mini-browser”: “next”,
@theia/monaco”: “next”,
@theia/navigator”: “next”,
@theia/outline-view”: “next”,
@theia/php”: “next”,
@theia/output”: “next”,
@theia/preferences”: “next”,
@theia/process”: “next”,
@theia/search-in-workspace”: “next”,
@theia/task”: “next”,
@theia/terminal”: “next”,
@theia/textmate-grammars”: “next”,
@theia/tslint”: “next”,
@theia/typescript”: “next”,
@theia/userstorage”: “next”,
@theia/workspace”: “next”
},
“resolutions”: {
“onigasm”: “2.2.1”,
“vscode-uri”:
},
“devDependencies”: {
@theia/cli”: “next”
},
“scripts”: {
“postinstall”: “download-debug-adapters”
},
“adapterDir”: “plugins”,
“adapters”: {
“vscode-go”: “https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/Go/0.9.2/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
}
}

@bineesh-p-b please open an issue on GitHub repo that we can track it

[Bineesh P B]

@anton-kosyakov i already post a comment in github.

just to recap, one should install vscode extension in plugins folder somehow

e.g. one can add “vscode-emmet”: “https://registry.npmjs.org/@theia/vscode-builtin-emmet/-/vscode-builtin-emmet-0.1.0.tgz” to “adapters” property for the given package json

[Bineesh P B]

@anton-kosyakov working perfectly but still the console error is there.
is that because of any dependency issue?
editor.main.js:158 Uncaught Error: Cannot read property ‘items’ of undefined

TypeError: Cannot read property ‘items’ of undefined
at editor.main.js:2056
at Object.g [as _notify] (editor.main.js:141)
at Object.enter (editor.main.js:145)
at n.Class.derive._creator._run (editor.main.js:146)
at n.Class.derive._creator._completed (editor.main.js:146)
at Object.g [as _notify] (editor.main.js:141)
at Object.enter (editor.main.js:145)
at n.Class.derive._oncancel._run (editor.main.js:146)
at n.Class.derive._oncancel._completed (editor.main.js:146)
at Object.g [as _notify] (editor.main.js:141)
at editor.main.js:158

I don’t know please opn the issue, we will have a look at some point