microsoft / inshellisense

IDE style command line auto complete
MIT License
8.22k stars 180 forks source link

Cannot create property '0.0.0' on string '@withfig/autocomplete/build/@usermn/sdc/index.js' #148

Closed mimaster closed 5 months ago

mimaster commented 5 months ago

Describe the bug When I try to execute the "is" command, the command line throws the following error:

❯ is
file:///Users/wubin/Library/pnpm/global/5/.pnpm/@microsoft+inshellisense@0.0.1-rc.6/node_modules/@microsoft/inshellisense/build/runtime/runtime.js:19
            activeSet[route] = `@withfig/autocomplete/build/${s}${prefix}`;
                             ^

TypeError: Cannot create property '0.0.0' on string '@withfig/autocomplete/build/@usermn/sdc/index.js'
    at file:///Users/wubin/Library/pnpm/global/5/.pnpm/@microsoft+inshellisense@0.0.1-rc.6/node_modules/@microsoft/inshellisense/build/runtime/runtime.js:19:30
    at Array.forEach (<anonymous>)
    at file:///Users/wubin/Library/pnpm/global/5/.pnpm/@microsoft+inshellisense@0.0.1-rc.6/node_modules/@microsoft/inshellisense/build/runtime/runtime.js:16:16
    at Array.forEach (<anonymous>)
    at file:///Users/wubin/Library/pnpm/global/5/.pnpm/@microsoft+inshellisense@0.0.1-rc.6/node_modules/@microsoft/inshellisense/build/runtime/runtime.js:13:10
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadESM (node:internal/process/esm_loader:34:7)
    at async handleMainPromise (node:internal/modules/run_main:100:12)

Node.js v21.0.0

To Reproduce Steps to reproduce the behavior:

  1. Enter "is" in the command line and run the following command.

Expected behavior Run "is" command

Environment

Additional context Nothing

alanhe421 commented 5 months ago

The reason for this issue is that the current version specification of autocomplete has changed, and it has not yet supported and become compatible.

You can downgrade to version 2.648.2 under @microsoft/inshellisense's @withfig/autocomplete. I understand that should resolve it.

@mimaster

just like:

cd /Users/alanhe/.nvm/versions/node/v18.16.1/lib/node_modules/@microsoft/inshellisense
npm i @withfig/autocomplete@2.648.2

and retry.