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

#assignTargetDirs reached root #6

Closed
zbigg opened this issue Jul 22, 2020 · 1 comment · Fixed by #7
Closed

#assignTargetDirs reached root #6

zbigg opened this issue Jul 22, 2020 · 1 comment · Fixed by #7
Assignees
Labels
bug Something isn't working

Comments

@zbigg
Copy link
Owner

zbigg commented Jul 22, 2020

Trying to run copy-production-deps (v0.1.6) on this repo: https://github.com/yshrsmz/nuxt-serverless-test yields following error

copy-production-deps: failed: Error: #assignTargetDirs reached root, report this as bug Error: #assignTargetDirs reached root, report this as bug
    at resolve (/home/zagorski/zz/copy-production-deps/lib/copy-production-deps.js:246:23)
    at getResolved (/home/zagorski/zz/copy-production-deps/lib/copy-production-deps.js:255:17)
    at assignTargetDirs (/home/zagorski/zz/copy-production-deps/lib/copy-production-deps.js:278:9)
    at Object.copyProductionDeps (/home/zagorski/zz/copy-production-deps/lib/copy-production-deps.js:379:28)
    at /home/zagorski/zz/copy-production-deps/lib/cli.js:99:38
    at asyncCommand (/home/zagorski/zz/copy-production-deps/lib/cli.js:32:15)
    at Object.handler (/home/zagorski/zz/copy-production-deps/lib/cli.js:85:18)
    at Object.runCommand (/home/zagorski/zz/copy-production-deps/node_modules/yargs/lib/command.js:240:40)
    at Object.parseArgs [as _parseArgs] (/home/zagorski/zz/copy-production-deps/node_modules/yargs/yargs.js:1164:39)
    at Object.get [as argv] (/home/zagorski/zz/copy-production-deps/node_modules/yargs/yargs.js:1088:21)

Followup of #4

@zbigg zbigg added the bug Something isn't working label Jul 22, 2020
@zbigg zbigg self-assigned this Jul 22, 2020
@zbigg
Copy link
Owner Author

zbigg commented Jul 22, 2020

This caused by assignTargetDirs not supporting namespaced packages like @nuxt/fuubar. Current implementation used very naive dirname(dirname(...) "method" to advance up into parent node_modules while searching for better location for package.

zbigg pushed a commit that referenced this issue Jul 22, 2020
Fixes sporadic 'assignTargetDirs reached root' error caused by naive
traversal of fodler tree which didn't supported namespaced packages.

Fixes #6
@zbigg zbigg closed this as completed in #7 Jul 22, 2020
zbigg pushed a commit that referenced this issue Jul 22, 2020
Fixes sporadic 'assignTargetDirs reached root' error caused by naive
traversal of fodler tree which didn't supported namespaced packages.

Fixes #6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant