Closed pixelzoom closed 1 year ago
While working on https://github.com/phetsims/beers-law-lab/issues/265, @samreid and I encountered this again. We like stateObjectToCreateElementArguments
. @samreid is going to go for it.
Rename complete, and I spot tested a CCK state in studio. My precommit hooks are saying:
/Users/samreid/apache-document-root/main/chipper/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:120
throw new Error(`Could not find Chromium (rev. ${this.puppeteer.browserRevision}). This can occur if either\n` +
^
Error: Could not find Chromium (rev. 1056772). This can occur if either
1. you did not perform an installation before running the script (e.g. `npm install`) or
2. your cache path is incorrectly configured (which is: /Users/samreid/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
at ChromeLauncher.resolveExecutablePath (/Users/samreid/apache-document-root/main/chipper/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:120:27)
at ChromeLauncher.executablePath (/Users/samreid/apache-document-root/main/chipper/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:166:25)
at ChromeLauncher.launch (/Users/samreid/apache-document-root/main/chipper/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:70:37)
at async /Users/samreid/apache-document-root/main/chipper/js/scripts/hook-pre-commit-task.js:114:29
at async /Users/samreid/apache-document-root/main/chipper/js/scripts/hook-pre-commit-task.js:101:21
Node.js v18.12.1
UPDATE: Thanks to https://stackoverflow.com/questions/68051648/could-not-find-expected-browser-chrome-locally, I tried ~/apache-document-root/main/chipper$ node node_modules/puppeteer/install.js
and that seemed to work ok.
@pixelzoom do you want to review this change?
👍🏻 closing
This keeps confusing me over and over. In IOType:
stateToArgsForConstructor
is poorly named. These are not arguments to any constructor, including the core-type constructor. They are arguments to the creation function (createElement
) of the PhetioDynamicElementContainer, as stated in the documentation.There's also the inconsistency of "state" versus "state object", which is a problem throughout the API that has been previously reported.
So I recommended to renaming
stateToArgsForConstructor
tostateObjectToCreateElementArguments
.