elm language server does not work with neovim - elm

I have tried to use elmls with nvim-lsp but lsp does not work. I am using nvim-lspconfig and nvim-lspinstaller. as for elmls i have the following configuration.
lspconfig.elmls.setup {
root_dir = require "lspconfig.util".root_pattern("elm.json",".git")
}
Also, how to describe the contents of :LspLog.
[START][2022-07-19 11:26:29] LSP logging initiated
[ERROR][2022-07-19 11:26:30] .../vim/lsp/rpc.lua:420 "rpc" "elm-language-server" "stderr" "(node:61562) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time\n(Use `node --trace-warnings ...` to show where the warning was created)\n"
[ERROR][2022-07-19 11:26:30] ...lsp/handlers.lua:455 "Unhandled Rejection at: Promise [object Promise] reason:, TypeError: Failed to parse URL from /Users/bokutotu/.local/share/nvim/lsp_servers/elmls/node_modules/#elm-tooling/elm-language-server/node_modules/web-tree-sitter/tree-sitter.wasm"
[START][2022-07-19 11:26:35] LSP logging initiated
[ERROR][2022-07-19 11:26:54] .../vim/lsp/rpc.lua:420 "rpc" "elm-language-server" "stderr" "(node:61647) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time\n(Use `node --trace-warnings ...` to show where the warning was created)\n"
[ERROR][2022-07-19 11:26:54] ...lsp/handlers.lua:455 "Unhandled Rejection at: Promise [object Promise] reason:, TypeError: Failed to parse URL from /Users/bokutotu/.local/share/nvim/lsp_servers/elmls/node_modules/#elm-tooling/elm-language-server/node_modules/web-tree-sitter/tree-sitter.wasm"
I am looking for elmls to work correctly with nvim.

I had the same problem, downgrading Node from 18.4 to 16.x worked for me.
Please refer to this issue

Related

(plugin node-resolve) Error: Error running plugin hook resolveId for node-resolve, expected a function hook

Following 14.0.0 version upgrade for "#rollup/plugin-node-resolve" plugin, when running my build I always get this error message :
[!] (plugin node-resolve) Error: Error running plugin hook resolveId for node-resolve, expected a function hook.
Error: Error running plugin hook resolveId for node-resolve, expected a function hook.
at error (/Users/***/Documents/GitHub/poke/node_modules/rollup/dist/shared/rollup.js:198:30)
at throwInvalidHookError (/Users/***/Documents/GitHub/poke/node_modules/rollup/dist/shared/rollup.js:22635:12)
at /Users/***/Documents/GitHub/poke/node_modules/rollup/dist/shared/rollup.js:22776:24
Was there any breaking change that I should be aware ?

How to get proper detailed debug messages in Vue.js?

I'm trying to debug my VueJs3 application. Often I find that the debug messages shown in the console are cryptic and non-specific. This is an example of what I recently received:
runtime-core.esm-bundler.js?5c40:958 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'emitsOptions')
at shouldUpdateComponent (runtime-core.esm-bundler.js?5c40:958)
at updateComponent (runtime-core.esm-bundler.js?5c40:4448)
at processComponent (runtime-core.esm-bundler.js?5c40:4402)
at patch (runtime-core.esm-bundler.js?5c40:3993)
at patchBlockChildren (runtime-core.esm-bundler.js?5c40:4307)
at patchElement (runtime-core.esm-bundler.js?5c40:4215)
at processElement (runtime-core.esm-bundler.js?5c40:4073)
at patch (runtime-core.esm-bundler.js?5c40:3990)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js?5c40:4608)
at ReactiveEffect.run (reactivity.esm-bundler.js?a1e9:160)
Unfortunately these messages do not help narrow down the specific component or line where an object is null. In fact these lines dont reference any of my files. I do have Vue Chrome extension installed, but that doesn't show any debug information. I'm used to working with python/django where an exception triggers a beautiful cascade of stack trace which helps to easily debug errors. How can I be more productive in solving errors in Vue?

Import fritzapi (node package) into Ionic project

I am currently trying to use this API in my Ionic project, but man, I have no clue on how to do it. I tried figuring it out using things like this, but I always get errors on ionic server:
101 unchanged chunks
[ng] chunk {home-home-module} home-home-module.js, home-home-module.js.map (home-home-module) 3.07 MB [rendered]
[ng]
[ng] ERROR in ./node_modules/request/lib/har.js
[ng] Module not found: Error: Can't resolve 'fs' in 'D:\Programmierung\Workspaces\Ionic\HomeAutomation\node_modules\request\lib'
[ng] ERROR in ./node_modules/forever-agent/index.js
[ng] Module not found: Error: Can't resolve 'net' in 'D:\Programmierung\Workspaces\Ionic\HomeAutomation\node_modules\forever-agent'
[ng] ERROR in ./node_modules/tough-cookie/lib/cookie.js
[ng] Module not found: Error: Can't resolve 'net' in 'D:\Programmierung\Workspaces\Ionic\HomeAutomation\node_modules\tough-cookie\lib'
[ng] ERROR in ./node_modules/tunnel-agent/index.js
[ng] Module not found: Error: Can't resolve 'net' in 'D:\Programmierung\Workspaces\Ionic\HomeAutomation\node_modules\tunnel-agent'
[ng] ERROR in ./node_modules/forever-agent/index.js
[ng] Module not found: Error: Can't resolve 'tls' in 'D:\Programmierung\Workspaces\Ionic\HomeAutomation\node_modules\forever-agent'
[ng] ERROR in ./node_modules/tunnel-agent/index.js
[ng] Module not found: Error: Can't resolve 'tls' in 'D:\Programmierung\Workspaces\Ionic\HomeAutomation\node_modules\tunnel-agent'
[ng] Time: 2321ms
[ng] i 「wdm」: Failed to compile.
I'm super new to webdev and Ionic in general, so I don't know if this is even possible, but I feel like it should be. Above error is a result of the following code:
import { Component } from '#angular/core';
import * as fritzapi from 'fritzapi';
#Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
constructor() {
fritzapi.getSessionID("removedforstack", "removedforstack").then(function(sid) {
console.log(sid);
});
}
}
Thanks in advance to everyone who's trying to help <3
I suspect this isn't possible. I think that you are trying to use something that's expected to be run on the local network in a node environment.
I did a search and found this article:
https://www.amadousall.com/angular-cli-module-not-found-error-cant-resolve/
Which say they used to do this:
supply an empty module when fs, crypto, tls and net were requested.
Which doesn't make sense really out of context but I couldn't find a simple bit to quote, take a look at the article.
Ultimately the angular team says:
Browser code should not rely on things that are not available in browser environments.
I'm assuming that the library needs to use these things to connect to the local network and interact with your home automation.
If i'm wrong then the article does have a way to supply an empty file instead of those modules, so if the code has alternate modes then it could work, but it doesn't seem likely to me off the top of my head.

How do I debug React Native with VSCode on Expo?

I'm sorry, I was able to get this all to work yesterday, but I can't get Expo to attach to my VS Code Debugger today, with various problems.
At this moment I have no server running. Expo is open in my simulator. I hit "run" on "Debug in Expo" from VS Code and I get this error:
(node:16799) UnhandledPromiseRejectionWarning: Error: `fsevents` unavailable (this watcher can only be used on Darwin)
at new FSEventsWatcher (/Users/TuzMacbookPro2017/Development/QMG/Learning/Tuz1App/node_modules/sane/src/fsevents_watcher.js:41:11)
at createWatcher (/Users/TuzMacbookPro2017/Development/QMG/Learning/Tuz1App/node_modules/jest-haste-map/build/index.js:780:23)
at Array.map (<anonymous>)
at HasteMap._watch (/Users/TuzMacbookPro2017/Development/QMG/Learning/Tuz1App/node_modules/jest-haste-map/build/index.js:936:44)
at _buildPromise._buildFileMap.then.then.hasteMap (/Users/TuzMacbookPro2017/Development/QMG/Learning/Tuz1App/node_modules/jest-haste-map/build/index.js:355:23)
at processTicksAndRejections (internal/process/next_tick.js:81:5)
(node:16799) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16799) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[Error] Error: Could not start the packager.
Let's start the server and see what happens...
Server loads, all good. I haven't selected "Run" from the Metro screen.
Let's try running the debugger again and see what happens...
Error: listen EADDRINUSE: address already in use :::8081
at Server.setupListenHandle [as _listen2] (net.js:1256:14)
at listenInCluster (net.js:1304:12)
at Server.listen (net.js:1392:7)
etc...
Makes sense, npm is running on port 8081. I can load the project in Expo; when I do, it opens up a chrome debug window. Let's hit "Stop Remote Debugging" and see if we can run the debugger from VS Code again (probably not since the port is still in use. -- right, same error.)
Ok now that we've disabled remote debugging in expo, let's stop the server and maybe try to restart from VS Code? Nope. Simple error:
[Error] Error: Could not start the packager.
Any help? I KNEW I should have written down all the steps I took yesterday!

Angular 4 #ngx-translate Karma Jasmin test cases

Trying to integrate Angular 4 + #ngx-translate. Everything is executing and working properly with npm start. Problem arises when I tries to npm test run Karma test cases. All these started after adding #ngx-translate capabilities.
Console get below error:
20 09 2017 14:24:30.334:INFO [Chrome 60.0.3112 (Windows 7 0.0.0)]: Connected on socket n1uvSjMzMfCGU26zAAAA with id 7587189
Chrome 60.0.3112 (Windows 7 0.0.0) ERROR
Uncaught TypeError: Cannot read property 'Injectable' of undefined
at node_modules/#ngx-translate/core/bundles/core.umd.js:817
On browser console:
Uncaught TypeError: Cannot read property 'Injectable' of undefined
at Object.<anonymous> (core.umd.js:817)
at __webpack_require__ (core.umd.js:30)
at Object.module.exports (core.umd.js:1421)
at __webpack_require__ (core.umd.js:30)
at module.exports (core.umd.js:76)
at core.umd.js:79
at webpackUniversalModuleDefinition (core.umd.js:9)
at core.umd.js:10
ng-bootstrap.js:9 Uncaught TypeError: Cannot read property 'core' of undefined
at webpackUniversalModuleDefinition (ng-bootstrap.js:9)
at ng-bootstrap.js:10
On browser:
OtherComponent when inside a test host should process Instance name
TypeError: Cannot read property 'bpmWrapWorkItemList' of undefined
TypeError: Cannot read property 'bpmWrapWorkItemList' of undefined
Please help !!! I am new to Angular 4..
Please put beforeEach block to update language for translateservice
beforeEach(inject([TranslateService], (service: TranslateService) => {
service.use('de');
}));
I had a similar issue, and was able to resolve the problem by removing two script definitions in .angular-cli.json.
I replaced
"scripts": [
"../node_modules/#ngx-translate/core/bundles/core.umd.js",
"../node_modules/#ngx-translate/http-loader/bundles/http-loader.umd.js"
],
with
"scripts": [],
While this resolves the problem, and the translate service still works, I do not know why those scripts are required in the first place, and if it's okay to remove them.