fannheyward/coc-rome

Error with rome.cmd

boehs opened this issue · 6 comments

boehs commented

extension crashes with

SyntaxError: Invalid or unexpected token
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47
[Info  - 2:41:05 PM] Connection to server got closed. Server will restart.
C:\Users\ebrob\AppData\Roaming\npm\rome.CMD:1
@ECHO off
^
boehs commented

seems to be some sort of pathing issue, similar issue here: https://www.gitmemory.com/issue/prettier/prettier-vscode/1907/822375970

boehs commented

fixed with

	"rome.bin": "C:\\Users\\ebrob\\AppData\\Roaming\\npm\\node_modules\\rome\\bin\\rome",

,issue likely from bin = join(workspace.root, "node_modules", "rome", "bin", "rome", "index.js");

boehs commented

Issue stems from global rome installation perhaps?

@boehs coc-rome can only use rome bin from local node_modules or coc-settings.json, global rome is not support by now.

boehs commented

This should be noted or done :)

boehs commented

Thanks