ArdenIvanov / svelte-intellisense

VSCode extension for intellisense for data, events, slots etc. in components.
59 stars 5 forks source link

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

Open james-bay opened 5 years ago

james-bay commented 5 years ago

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

ArdenIvanov commented 5 years ago

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

Nuc1eoN commented 5 years ago

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

vmohir commented 5 years ago

I have the same issue. I get this error:

Cannot find module './importResolvers/NodeModulesImportResolver'

ArdenIvanov commented 5 years ago

Could you please specify which OS you use? MacOS?

vmohir commented 5 years ago

Could you please specify which OS you use? MacOS?

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

Nuc1eoN commented 5 years ago

My OS is archlinux

ArdenIvanov commented 5 years ago

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

Paulmicha commented 5 years ago

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

jongbatax commented 5 years ago

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

knopki commented 5 years ago

@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.

james-bay commented 5 years ago

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

ArdenIvanov commented 5 years ago

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

james-bay commented 5 years ago

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