pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Targets parameter does not work

Open SimonsUnikaNamn opened this issue 7 years ago • 3 comments

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)```

SimonsUnikaNamn avatar Jan 10 '19 10:01 SimonsUnikaNamn

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

cjheppell avatar Jan 10 '19 11:01 cjheppell

#603

Jullekungfu avatar Jan 10 '19 11:01 Jullekungfu

Fixed in [email protected]. Thanks!

igorklopov avatar Jan 10 '19 18:01 igorklopov