Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError thrown when computing completion items at the end of a COPY instruction with flags #97

Closed
rcjsuen opened this issue Dec 6, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Dec 6, 2021

import { DockerfileLanguageServiceFactory } from "dockerfile-language-service";
const service = DockerfileLanguageServiceFactory.createLanguageService();
service.computeCompletionItems("COPY --from=a ", { line: 0, character: 14 });
$ node test.js
../dockerfile-language-service/out/src/dockerAssist.js:354
        const lastRange = args[args.length - 1].getRange();
                                                ^

TypeError: Cannot read properties of undefined (reading 'getRange')
    at DockerAssist.createTargetFolderProposals (../dockerfile-language-service/out/src/dockerAssist.js:354:49)
    at DockerAssist.createCopyProposals (../dockerfile-language-service/out/src/dockerAssist.js:344:21)
    at DockerAssist.computeProposals (../dockerfile-language-service/out/src/dockerAssist.js:174:37)
    at LanguageService.computeCompletionItems (../dockerfile-language-service/out/src/languageService.js:56:29)
    at Object.<anonymous> (../dockerfile-language-service/out/src/tmp.js:5:9)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153: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:81:12)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant