Skip to content

lessc : source-map with auto-prefix plugin make an error #42

@ppierre

Description

@ppierre

When using less-plugin-autoprefix with the --source-map option ; the CSS file is generated but lessc exit with an error :
(Rq: changing --source-map to --source-map-map-inline avoid the error)

cmd.exe /D /C call C:\......\node_modules\.bin\lessc.cmd --source-map --autoprefix test.less test.css
internal/fs/utils.js:793
  throw new ERR_INVALID_ARG_TYPE(
  ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of SourceMapGenerator
    at writeFile (fs.js:1487:5)
    at go$writeFile (C:\......\node_modules\graceful-fs\graceful-fs.js:138:14)
    at Object.writeFile (C:\......\node_modules\graceful-fs\graceful-fs.js:135:12)
    at writeSourceMap (C:\......\node_modules\less\bin\lessc:183:10)
    at writeSourceMapIfNeeded (C:\......\node_modules\less\bin\lessc:207:7)
    at C:\......\node_modules\less\bin\lessc:299:11
    at C:\......\node_modules\less\bin\lessc:237:11
    at C:\......\node_modules\graceful-fs\graceful-fs.js:143:16
    at C:\......\node_modules\graceful-fs\graceful-fs.js:61:14
    at FSReqCallback.oncomplete (fs.js:180:23) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Process finished with exit code 1

Command executed by a "file watcher" of JetBrain IDE (PHPStrom). All parameters by default except adding --autoprefix
lessc installed locally as "devDependencies".

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