jsconfig.json icon indicating copy to clipboard operation
jsconfig.json copied to clipboard

Not working properly

Open silkfire opened this issue 3 years ago • 7 comments

When running the command npx jsconfig.json, a file called jsconfig.json is generated at C:\Users\<username>\AppData\Roaming\npm with the following contents:

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
  exec "$basedir/node"  "$basedir/node_modules/jsconfig.json/dist/cli.js" "$@"
else 
  exec node  "$basedir/node_modules/jsconfig.json/dist/cli.js" "$@"
fi

The file is opened automatically in VSCode.

No jsonconfig.json is generated in the current working directory of my project.

silkfire avatar May 22 '21 13:05 silkfire

Hi, thanks for reporting an issue! :)

First of all I assume you're running npx jsconfig.json, not npx jsonconfig.json as you mentioned in the issue, is that correct? Also I personally have no experience running scripts on windows as I am a linux/mac user for some time now, so this looks specific to that platform.

I'll have a look into that later today and hopefully come up with a solution. I'll make sure to keep you posted.

jsimck avatar May 28 '21 09:05 jsimck

Sorry, I meant jsonfig.js, yes. Thanks, much appreciated!

silkfire avatar May 28 '21 18:05 silkfire

Hi, just an update, I have prepared (hopefully) a fix, but haven't yet have a time to test it out. I'm going to try to get some of my co-workers with windows to help me fix this issue. Will let you know when I have more information on the error.

jsimck avatar May 31 '21 21:05 jsimck

Hello, sorry for late reply, I unfortunately didn’t have time before my long vacation so the update is kind of late.

Not sure if this is still relevant, however I’ve largery refactored the code base and implemented multiple windows-speficic checks and fixes. So hopefully the 2.1.0 version should finally resolve the issue.

let me kniw if there’s anything else I can help you with :).

jsimck avatar Jul 27 '21 18:07 jsimck

No worries, I've been able to carry out work without this extension. I just tried the new version but getting the same results... It just opens up the file %APPDATA%\Roaming\npm\jsconfig.json and doesn't add any file to my project.

silkfire avatar Jul 28 '21 09:07 silkfire

I've same problem!

juniorbotelho avatar Dec 18 '21 15:12 juniorbotelho

Would you be able to provide some additional information?

  • Are you using npm through window WSL or some other way? (not familiar how these are actually installed on windows since I don't use it).
  • Is there any additional error output, or does it just open that directory?

Thank you very much! Unfortunately I don't have time to try this in windows currently. I'll try to figure something out by the end of next week.

jsimck avatar Jan 09 '22 18:01 jsimck