babel-plugin-transform-postcss
babel-plugin-transform-postcss copied to clipboard
ENOENT/EACCESS errors on Windows 10
Hello,
I get the following error when I try to build my files:
> babel src --ignore __tests__,__mocks__ --out-dir lib
Error: ENOENT: no such file or directory, mkdir 'C:\tmp\bptp-cgitfrontendcomponents'
at Object.fs.mkdirSync (fs.js:890:18)
at main (C:\GIT\frontend-components\node_modules\babel-plugin-transform-postcss\dist\postcss-server.js:59:18)
at __dirname (C:\GIT\frontend-components\node_modules\babel-plugin-transform-postcss\dist\postcss-server.js:166:13)
at Object.<anonymous> (C:\GIT\frontend-components\node_modules\babel-plugin-transform-postcss\dist\postcss-server.js:170:5)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
So I added manually tmp dir in C: but now I get:
Error: listen EACCES \tmp\bptp-cgitfrontendcomponents.sock
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at Server.setupListenHandle [as _listen2] (net.js:1298:19)
at listenInCluster (net.js:1363:12)
at Server.listen (net.js:1474:5)
at Promise (C:\GIT\frontend-components\node_modules\babel-plugin-transform-postcss\dist\postcss-server.js:154:12)
at Promise (<anonymous>)
at main (C:\GIT\frontend-components\node_modules\babel-plugin-transform-postcss\dist\postcss-server.js:134:9)
at __dirname (C:\GIT\frontend-components\node_modules\babel-plugin-transform-postcss\dist\postcss-server.js:166:13)
at Object.<anonymous> (C:\GIT\frontend-components\node_modules\babel-plugin-transform-postcss\dist\postcss-server.js:170:5)
Tried also running cmd with admin rights - still same error. Did anyone have similar issue?
Using: node v8.1.3 npm v5.3.0 bptp v0.2.1
.babelrc
{
"presets": [
["es2015", {"modules": false}],
"react"
],
"plugins": [
"transform-class-properties",
"transform-object-rest-spread",
"transform-postcss"
]
}
Yeah, this hasn't been tested on Windows. A PR would be welcome to introduce Windows support (including adding some CI service like Travis to ensure we keep things working).
I was trying to fix it with no luck. Using os.tmpdir()
as tmp directory fixes the ENOENT error but still get EACCES which I belive have something to do with socket port that is blocked. Do you know if we can specify socket port manually somewhere?
I don't know that the error code corresponds, but the IPC socket path seems to require a special name on Windows.