svelte-intellisense icon indicating copy to clipboard operation
svelte-intellisense copied to clipboard

Error: Cannot find module './importResolvers/RollupImportResolver'

Open james-bay opened this issue 6 years ago • 13 comments

I installed the actual version of vscode and installed sveltejs/template via degit. For vscode, I added only two plugins: Svelte and Svelte Intellisense. I open the template project in vscode, and when I open the .svelte file in vscode, I get an error message: The Svelte Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

Output tab:

internal/modules/cjs/loader.js:586
    throw err;
    ^

Error: Cannot find module './importResolvers/RollupImportResolver'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
    at Function.Module._load (internal/modules/cjs/loader.js:510:25)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/james/.vscode/extensions/ardenivanov.svelte-intellisense-0.5.0/server/out/server.js:22:30)
    at Object.<anonymous> (/home/james/.vscode/extensions/ardenivanov.svelte-intellisense-0.5.0/server/out/server.js:195:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
[Info  - 14:05:08] Connection to server got closed. Server will restart.

And it's repeated 5 times.

vscode: 1.36.1 Svelte plugin: 0.9.2 Svelte Intellisense plugin: 0.5.0

james-bay avatar Jul 23 '19 11:07 james-bay

Should be fixed with #12 Could you please check with version 0.6.0?

ArdenIvanov avatar Aug 05 '19 12:08 ArdenIvanov

I have got the same issue. Seems 0.6 did not fix it :(

vscode: v1.36.1 Svelte plugin: v0.9.2 Svelte Intellisense: v0.6

nuc1eon avatar Aug 05 '19 20:08 nuc1eon

I have the same issue. I get this error:

Cannot find module './importResolvers/NodeModulesImportResolver'

vmohir avatar Aug 06 '19 08:08 vmohir

Could you please specify which OS you use? MacOS?

ArdenIvanov avatar Aug 06 '19 08:08 ArdenIvanov

Could you please specify which OS you use? MacOS?

OS: Ubuntu 18.04 Also I don't use Rollup. I'm using Webpack.

vmohir avatar Aug 06 '19 08:08 vmohir

My OS is archlinux

nuc1eon avatar Aug 06 '19 19:08 nuc1eon

Unfortunately I have neither OS to debug and fix the issue. If you can do that by yourself, it would be great

ArdenIvanov avatar Aug 08 '19 17:08 ArdenIvanov

Same here using Pop!_OS 19.04 (based on Ubuntu) -> seems related to Linux, unless it only works under MacOS.

Paulmicha avatar Aug 24 '19 21:08 Paulmicha

Same here too, using Pop!_OS 18.04 (based on Ubuntu)

jongbatax avatar Aug 28 '19 03:08 jongbatax

@ArdenIvanov Found problem: importResolvers directory name in the source. importResolvers directory name after running yarn compile. But ImportResolvers in the vsix (from marketplace). Looks like publication error.

knopki avatar Aug 28 '19 13:08 knopki

As @knopki wrote, it’s enough to rename the ImportResolvers directory to importResolvers on the path /home/$HOME/.vscode/extensions/ardenivanov.svelte-intellisense-0.6.0/server/out/ and the extension starts working. Will this bug be resolved in the near future?

A use Kubuntu 19.04

james-bay avatar Sep 06 '19 15:09 james-bay

Package for version 0.7.0 has the fix, could you please test if it work finally :)

ArdenIvanov avatar Oct 03 '19 13:10 ArdenIvanov

@ArdenIvanov It works fine now! Большое спасибо!

james-bay avatar Oct 14 '19 14:10 james-bay