Motoko-hash-map install issues using mops

Hi @ZenVoich

I got errors after installing the “motoko-hash-map” using Mops.

I am using the latest version of DFX, not sure where it go wrong :frowning_face:

Hi @rncrmn, thanks for reporting the problem!

This seems to be due to the fact that we installed a package with one name and then renamed it.

If you run mops install it should start working.

I will also update that post of mine…

Thank you, unfortunately it doesn’t work :frowning_face:

I do revert it to its original name “motoko-hash-map” and run the command “mops install” and I also do the “Motoko: restart language server” and still got the same issue.

Hi @ZenVoich

I tried the base and I get the same error :frowning_face:

@ZenVoich below is the debug log, just in case you need it.

0 verbose cli /home/linuxbrew/.linuxbrew/Cellar/node@16/16.16.0/bin/node /home/linuxbrew/.linuxbrew/Cellar/node@16/16.16.0/lib/node_modules/npm/bin/npm-cli.js
1 info using npm@8.11.0
2 info using node@v16.16.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/home/linuxbrew/.linuxbrew/Cellar/node@16/16.16.0/lib/node_modules/npm/npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 3ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/home/aaron/ic-projects/nooted/.npmrc Completed in 1ms
10 timing config:load:project Completed in 6ms
11 timing config:load:file:/home/aaron/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/home/linuxbrew/.linuxbrew/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 0ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 16ms
19 timing npm:load:configload Completed in 17ms
20 timing npm:load:mkdirpcache Completed in 1ms
21 timing npm:load:mkdirplogs Completed in 1ms
22 verbose title npm exec ic-mops sources
23 verbose argv "exec" "--no-yes" "ic-mops" "--" "sources"
24 timing npm:load:setTitle Completed in 1ms
25 timing config:load:flatten Completed in 3ms
26 timing npm:load:display Completed in 3ms
27 verbose logfile logs-max:10 dir:/home/aaron/.npm/_logs
28 verbose logfile /home/aaron/.npm/_logs/2023-02-03T15_03_13_915Z-debug-0.log
29 timing npm:load:logFile Completed in 5ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 30ms
33 silly logfile start cleaning logs, removing 1 files
34 silly logfile done cleaning log files
35 timing arborist:ctor Completed in 1ms
36 timing arborist:ctor Completed in 0ms
37 http fetch GET 200 https://registry.npmjs.org/ic-mops 932ms (cache revalidated)
38 timing arborist:ctor Completed in 0ms
39 timing command:exec Completed in 1319ms
40 verbose stack Error: canceled
40 verbose stack     at exec (/home/linuxbrew/.linuxbrew/Cellar/node@16/16.16.0/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:177:17)
40 verbose stack     at async module.exports (/home/linuxbrew/.linuxbrew/Cellar/node@16/16.16.0/lib/node_modules/npm/lib/cli.js:78:5)
41 verbose cwd /home/aaron/ic-projects/nooted
42 verbose Linux 5.10.102.1-microsoft-standard-WSL2
43 verbose node v16.16.0
44 verbose npm  v8.11.0
45 error canceled
46 verbose exit 1
47 timing npm Completed in 1415ms
48 verbose code 1
49 error A complete log of this run can be found in:
49 error     /home/aaron/.npm/_logs/2023-02-03T15_03_13_915Z-debug-0.log

Hello everyone,

I just released a patch to the Motoko VS Code extension (0.8.4) which might fix some of these issues (or at least make it easier to debug what’s happening).

You can find detailed logs in the “Output” tab after selecting “Motoko Language Server” from the dropdown, which will contain additional error details that could narrow down the underlying issue.

Also, in case this helps someone, make sure to double-check that you ran npm i -g ic-mops (rather than npm i -g mops, which is a different npm package).

I’ll keep an eye on this forum topic in case it’s possible to fix this on the VS Code side of things.

Cheers!

3 Likes

Hi @rvanasa the new patch of Motoko VS Code extension does fixed the issues for me.

Thank you so much :motoko_go:

3 Likes