jsimck / jsconfig.json

Small tool which automatically generates jsconfig.json, used for vscode workspace configuration, with some defaults and extracted webpack path aliases.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working properly

silkfire opened this issue · 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.

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.

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

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.

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 :).

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.

I've same problem!

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.