microsoft / inshellisense

IDE style command line auto complete
MIT License
8.24k stars 181 forks source link

Ubuntu WSL error #37

Closed bradbrownjr closed 8 months ago

bradbrownjr commented 8 months ago

Describe the bug When I attempt to run inshellisense, I receive the following error: /usr/local/lib/node_modules/@microsoft/inshellisense/build/index.js:5 import { Command } from "commander"; ^

SyntaxError: Unexpected token { at Module._compile (internal/modules/cjs/loader.js:723:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

To Reproduce Steps to reproduce the behavior: Run any of these commands: inshellisense inshellisense bind sudo inshellisense bind inshellisense --shell bash

Expected behavior A clear and concise description of what you expected to happen. It runs

Environment

WSL version: 1.2.5.0 Kernel version: 5.15.90.1 WSLg version: 1.0.51 MSRDC version: 1.2.3770 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.3570

Additional context Add any other context about the problem here. I installed npm fresh to be able to install inshellisense. The first attempt to install inshellisense led me to permissions errors, so I redid the command with sudo. This is the installation output (it looks like I might be missing some requisite libraries in my default WSL instance?):

sudo npm install -g @microsoft/inshellisense /usr/local/bin/inshellisense -> /usr/local/lib/node_modules/@microsoft/inshellisense/build/index.js /usr/local/bin/is -> /usr/local/lib/node_modules/@microsoft/inshellisense/build/index.js

protobufjs@7.2.5 postinstall /usr/local/lib/node_modules/@microsoft/inshellisense/node_modules/protobufjs node scripts/postinstall

npm WARN notsup Unsupported engine for chalk@5.3.0: wanted: {"node":"^12.17.0 || ^14.13 || >=16.0.0"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: chalk@5.3.0 npm WARN notsup Unsupported engine for wrap-ansi@8.1.0: wanted: {"node":">=12"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: wrap-ansi@8.1.0 npm WARN notsup Unsupported engine for commander@11.1.0: wanted: {"node":">=16"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: commander@11.1.0 npm WARN notsup Unsupported engine for ink@4.4.1: wanted: {"node":">=14.16"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: ink@4.4.1 npm WARN notsup Unsupported engine for strip-json-comments@5.0.1: wanted: {"node":">=14.16"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: strip-json-comments@5.0.1 npm WARN notsup Unsupported engine for yaml@2.3.4: wanted: {"node":">= 14"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: yaml@2.3.4 npm WARN notsup Unsupported engine for @withfig/api-bindings@0.30.3: wanted: {"node":">=16"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: @withfig/api-bindings@0.30.3 npm WARN notsup Unsupported engine for @withfig/api-bindings@0.29.4: wanted: {"node":">=14"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: @withfig/api-bindings@0.29.4 npm WARN notsup Unsupported engine for protobufjs@7.2.5: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: protobufjs@7.2.5 npm WARN notsup Unsupported engine for indent-string@5.0.0: wanted: {"node":">=12"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: indent-string@5.0.0 npm WARN notsup Unsupported engine for cli-cursor@4.0.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: cli-cursor@4.0.0 npm WARN notsup Unsupported engine for cli-truncate@3.1.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: cli-truncate@3.1.0 npm WARN notsup Unsupported engine for ansi-escapes@6.2.0: wanted: {"node":">=14.16"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: ansi-escapes@6.2.0 npm WARN notsup Unsupported engine for code-excerpt@4.0.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: code-excerpt@4.0.0 npm WARN notsup Unsupported engine for slice-ansi@6.0.0: wanted: {"node":">=14.16"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: slice-ansi@6.0.0 npm WARN notsup Unsupported engine for string-width@5.1.2: wanted: {"node":">=12"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: string-width@5.1.2 npm WARN notsup Unsupported engine for patch-console@2.0.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: patch-console@2.0.0 npm WARN notsup Unsupported engine for auto-bind@5.0.1: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: auto-bind@5.0.1 npm WARN notsup Unsupported engine for widest-line@4.0.1: wanted: {"node":">=12"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: widest-line@4.0.1 npm WARN notsup Unsupported engine for @alcalzone/ansi-tokenize@0.1.3: wanted: {"node":">=14.13.1"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: @alcalzone/ansi-tokenize@0.1.3 npm WARN notsup Unsupported engine for is-fullwidth-code-point@4.0.0: wanted: {"node":">=12"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: is-fullwidth-code-point@4.0.0 npm WARN notsup Unsupported engine for ansi-styles@6.2.1: wanted: {"node":">=12"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: ansi-styles@6.2.1 npm WARN notsup Unsupported engine for type-fest@3.13.1: wanted: {"node":">=14.16"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: type-fest@3.13.1 npm WARN notsup Unsupported engine for restore-cursor@4.0.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: restore-cursor@4.0.0 npm WARN notsup Unsupported engine for slice-ansi@5.0.0: wanted: {"node":">=12"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: slice-ansi@5.0.0 npm WARN notsup Unsupported engine for strip-ansi@7.1.0: wanted: {"node":">=12"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: strip-ansi@7.1.0 npm WARN notsup Unsupported engine for ansi-regex@6.0.1: wanted: {"node":">=12"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: ansi-regex@6.0.1 npm WARN notsup Unsupported engine for convert-to-spaces@2.0.1: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"10.19.0","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: convert-to-spaces@2.0.1

cpendery commented 8 months ago

Hi @bradbrownjr, as mentioned in the readme, inshellisense requires Node 16.x or higher. Please try upgrading your node version

bradbrownjr commented 8 months ago

Apologies, I overlooked that.

cpendery commented 8 months ago

No worries! Glad that fixed it for you @bradbrownjr