Skip to content

TypeError: fs.copyFile is not a function #18

@ScottHutchinson

Description

@ScottHutchinson

TFS 2018 on Windows Server with node.js Latest LTS Version: 12.18.3 (includes npm 6.14.6):

2020-07-22T23:12:09.8281274Z task display name: cloc --windows .
2020-07-22T23:12:09.8286442Z working folder: C:\Msft_test\AgentSmith_work\1\s
2020-07-22T23:12:09.8344899Z cloc-cli download url: file://C:/cloc/cloc-1.86.exe
2020-07-22T23:12:09.8345511Z arguments: --windows .
2020-07-22T23:12:09.8345591Z Downloading cloc.exe from:
2020-07-22T23:12:09.8345752Z Url {
2020-07-22T23:12:09.8345822Z protocol: 'file:',
2020-07-22T23:12:09.8345890Z slashes: true,
2020-07-22T23:12:09.8345973Z auth: null,
2020-07-22T23:12:09.8346037Z host: 'c',
2020-07-22T23:12:09.8346101Z port: null,
2020-07-22T23:12:09.8346166Z hostname: 'c',
2020-07-22T23:12:09.8346493Z hash: null,
2020-07-22T23:12:09.8346560Z search: null,
2020-07-22T23:12:09.8346624Z query: null,
2020-07-22T23:12:09.8346711Z pathname: '/cloc/cloc-1.86.exe',
2020-07-22T23:12:09.8346785Z path: '/cloc/cloc-1.86.exe',
2020-07-22T23:12:09.8346858Z href: 'file://c/cloc/cloc-1.86.exe' }
2020-07-22T23:12:09.8346939Z Copying file from '//c/cloc/cloc-1.86.exe'
2020-07-22T23:12:09.8383559Z ##[error]cloc --windows . failed
2020-07-22T23:12:09.8403635Z ##[error]TypeError: fs.copyFile is not a function
2020-07-22T23:12:09.8403837Z TypeError: fs.copyFile is not a function
2020-07-22T23:12:09.8403946Z at Object.downloadClocCli [as default] (C:\Msft_test\AgentSmith_work_tasks\cloc_7b598338-cf0d-4c3f-acc2-4967b6202533\1.2.1\clocCliDownloader.js:16:20)
2020-07-22T23:12:09.8404106Z at C:\Msft_test\AgentSmith_work_tasks\cloc_7b598338-cf0d-4c3f-acc2-4967b6202533\1.2.1\index.js:33:40
2020-07-22T23:12:09.8404193Z at next (native)
2020-07-22T23:12:09.8404295Z at C:\Msft_test\AgentSmith_work_tasks\cloc_7b598338-cf0d-4c3f-acc2-4967b6202533\1.2.1\index.js:7:71
2020-07-22T23:12:09.8404401Z at __awaiter (C:\Msft_test\AgentSmith_work_tasks\cloc_7b598338-cf0d-4c3f-acc2-4967b6202533\1.2.1\index.js:3:12)
2020-07-22T23:12:09.8404530Z at run (C:\Msft_test\AgentSmith_work_tasks\cloc_7b598338-cf0d-4c3f-acc2-4967b6202533\1.2.1\index.js:15:12)
2020-07-22T23:12:09.8404642Z at Object. (C:\Msft_test\AgentSmith_work_tasks\cloc_7b598338-cf0d-4c3f-acc2-4967b6202533\1.2.1\index.js:47:1)
2020-07-22T23:12:09.8404751Z at Module._compile (module.js:570:32)
2020-07-22T23:12:09.8404831Z at Object.Module._extensions..js (module.js:579:10)
2020-07-22T23:12:09.8404918Z at Module.load (module.js:487:32)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions