-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Running any script with pnp on node 13.0.1: "TypeError: paths is not iterable" #7642
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
Comments
Can you check whether the same is true for Yarn v2? |
it is - check out this run with the same repo using yarn 2.0.0-rc.6: https://github.com/sverweij/yarn-on-node-13/runs/272305615 |
Some research:
{
'0': '/Users/sander/path/to/index.js',
'1': null,
'2': true
}
I patched the line in the local .pnp.js to take that into account, like so: for (const path of paths || []) { ... and with that the problem seems to be gone. I could make a PR to change generate-pnp-map-api.tpl.js likewise (and the same in berry, I guess?) |
That would be great! I can't make the fix atm but I can merge it, and you can start using it through |
might be worth considering getting yarn into citgm so these breakages are caught before making it into a node stable release? |
Yep! I think the v1 is already there but the PnP path isn't covered at the moment. Maybe we could add the v2 and test both versions, since they have significantly different implementations. On our side we also have our own kind of "Canary in the goldmine" program, but I'm not sure whether Node publishes nightly builds that we could use for this purpose 🤔 [edit] Seems like there is! We should definitely add a test on our side too, then. |
* ci(circleci): prevent timeout on circle-ci macos node10 build The circle ci job for macOS on node 10 currently fails because it takes too long (both PR's #7649 and #7650 don't green because of that). A big chunk of the time is taken by updating homebrew - which in this macOS (the one connected to xcode 9 => macOS 10.12) does not contain node 10 by default. This change: - sets the required xcode version to 11.0 -> this gets us a more up to date macOS version (except for node 6, which isn't available in the homebrew associated with xcode 11) - removes the brew update from the macOS node 10 job * fix(generate-pnp-map-api.tpl.js): make running with Plug'n Play possible on node 13 On node 13 Module._findPath (which the setup() of this module redefines) also gets called with null for the path parameter (by lib/internal/bootstrap/pre_execution.js in the (new) function resolveMainPath). This fix ensures the patched _findPath also handles that situation. * ci(azure-pipelines): add node 13 (and 12) to the azure-pipeline matrix #7642 * ci(circleci): add node 13 (and 12) to the build matrix (linux) * docs(CHANGELOG.md): adds PR #7650 to the change log
* ci(circleci): prevent timeout on circle-ci macos node10 build The circle ci job for macOS on node 10 currently fails because it takes too long (both PR's #7649 and #7650 don't green because of that). A big chunk of the time is taken by updating homebrew - which in this macOS (the one connected to xcode 9 => macOS 10.12) does not contain node 10 by default. This change: - sets the required xcode version to 11.0 -> this gets us a more up to date macOS version (except for node 6, which isn't available in the homebrew associated with xcode 11) - removes the brew update from the macOS node 10 job * fix(generate-pnp-map-api.tpl.js): make running with Plug'n Play possible on node 13 On node 13 Module._findPath (which the setup() of this module redefines) also gets called with null for the path parameter (by lib/internal/bootstrap/pre_execution.js in the (new) function resolveMainPath). This fix ensures the patched _findPath also handles that situation. * ci(azure-pipelines): add node 13 (and 12) to the azure-pipeline matrix #7642 * ci(circleci): add node 13 (and 12) to the build matrix (linux) * docs(CHANGELOG.md): adds PR #7650 to the change log
* ci(circleci): prevent timeout on circle-ci macos node10 build The circle ci job for macOS on node 10 currently fails because it takes too long (both PR's yarnpkg#7649 and yarnpkg#7650 don't green because of that). A big chunk of the time is taken by updating homebrew - which in this macOS (the one connected to xcode 9 => macOS 10.12) does not contain node 10 by default. This change: - sets the required xcode version to 11.0 -> this gets us a more up to date macOS version (except for node 6, which isn't available in the homebrew associated with xcode 11) - removes the brew update from the macOS node 10 job * fix(generate-pnp-map-api.tpl.js): make running with Plug'n Play possible on node 13 On node 13 Module._findPath (which the setup() of this module redefines) also gets called with null for the path parameter (by lib/internal/bootstrap/pre_execution.js in the (new) function resolveMainPath). This fix ensures the patched _findPath also handles that situation. * ci(azure-pipelines): add node 13 (and 12) to the azure-pipeline matrix yarnpkg#7642 * ci(circleci): add node 13 (and 12) to the build matrix (linux) * docs(CHANGELOG.md): adds PR yarnpkg#7650 to the change log
* ci(circleci): prevent timeout on circle-ci macos node10 build The circle ci job for macOS on node 10 currently fails because it takes too long (both PR's yarnpkg#7649 and yarnpkg#7650 don't green because of that). A big chunk of the time is taken by updating homebrew - which in this macOS (the one connected to xcode 9 => macOS 10.12) does not contain node 10 by default. This change: - sets the required xcode version to 11.0 -> this gets us a more up to date macOS version (except for node 6, which isn't available in the homebrew associated with xcode 11) - removes the brew update from the macOS node 10 job * fix(generate-pnp-map-api.tpl.js): make running with Plug'n Play possible on node 13 On node 13 Module._findPath (which the setup() of this module redefines) also gets called with null for the path parameter (by lib/internal/bootstrap/pre_execution.js in the (new) function resolveMainPath). This fix ensures the patched _findPath also handles that situation. * ci(azure-pipelines): add node 13 (and 12) to the azure-pipeline matrix yarnpkg#7642 * ci(circleci): add node 13 (and 12) to the build matrix (linux) * docs(CHANGELOG.md): adds PR yarnpkg#7650 to the change log
Uh oh!
There was an error while loading. Please reload this page.
Do you want to request a feature or report a bug?
A bug (or I'm doing something stupid...)
What is the current behavior?
TypeError: paths is not iterable
(see below).If the current behavior is a bug, please provide the steps to reproduce.
On node 13, with yarn plug'n play enabled, run any javascript through yarn.
What is the expected behavior?
The lifecycle script runs without errors (just like on node 12).
Please mention your node.js, yarn and operating system version.
node.js: 13.0.1
yarn: 1.19.1 (and 2.0.0-rc.6)
OS: macOS 10.14.6
The text was updated successfully, but these errors were encountered: