pkg
pkg copied to clipboard
Targets parameter does not work
Simple example gives error from [email protected], worked with 4.3.4
pkg --targets node6-macos-x64 SOSI.js
> [email protected]
> Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v6.11.5-macos-x64 [====================] 100%
> Error! TypeError: Expected `cwd` to be of type `string` but received type `undefined`
at module.exports.sync (/usr/local/lib/node_modules/pkg/node_modules/dir-glob/index.js:56:9)
at globDirs (/usr/local/lib/node_modules/pkg/node_modules/globby/index.js:58:9)
at getPattern (/usr/local/lib/node_modules/pkg/node_modules/globby/index.js:61:64)
at globTasks.reduce (/usr/local/lib/node_modules/pkg/node_modules/globby/index.js:107:19)
at Array.reduce (<anonymous>)
at Function.module.exports.sync (/usr/local/lib/node_modules/pkg/node_modules/globby/index.js:106:26)
at collect (/usr/local/lib/node_modules/pkg/lib-es5/walker.js:145:27)
at expandFiles (/usr/local/lib/node_modules/pkg/lib-es5/walker.js:152:9)
at Walker._callee$ (/usr/local/lib/node_modules/pkg/lib-es5/walker.js:375:25)
at tryCatch (/usr/local/lib/node_modules/pkg/node_modules/regenerator-runtime/runtime.js:62:40)```
I'm also experiencing this error. Even downgrading pkg to an older version doesn't fix it.
Seems like it's one of pkg's (transitive) dependencies causing this issue. Specifically, dir-glob and this pull request which introduced the breaking change: https://github.com/kevva/dir-glob/pull/8
#603
Fixed in [email protected]. Thanks!