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

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

Open
ppierre opened this issue Sep 6, 2021 · 1 comment
Open

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

ppierre opened this issue Sep 6, 2021 · 1 comment

Comments

@ppierre
Copy link

ppierre commented Sep 6, 2021

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".

@ppierre
Copy link
Author

ppierre commented Sep 6, 2021

My bad fixed by : #41
Why this pull request ins't apply ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant