Witam..
Od jakiegoś czasu chcąc użyć jakiegokolwiek pakietu z NPM w node nie mogę tego zrobić. Dotąd problem nigdy nie występował.
Tworze w folderze z projektem plik package.json poprzez npm init
, przykładowo dodaję jshint, folder node_modules/
tworzony jest poprawnie. W nim bin/
itd... próbując wywołać w terminalu VSCode czy cmd node node_modules/.bin/jshint
na konkretnym pliku czyli js/classes.js
w moim przypadku czy jakikolwiek inny kończy się to tak jak poniżej. Pliku lub ścieżki do niego mogę w ogóle nie podać a problem jest ciągle ten sam. Dodam, że przeinstalowałem node i nic... kompletnie, już nie wiem co mam robić.
Ciągle wypluwa takie jakieś błędy, które jakby informowały, że to z pakietem jshint jest coś nie tak. Ale jakikolwiek inny też zgłasza błąd przy próbie odpalenia go.
c:\Users\NanoSoft\Desktop\app\node_modules\.bin\jshint:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1032:15)
at Module._compile (node:internal/modules/cjs/loader:1067:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47
Jak można to rozwiązać ?