-
Notifications
You must be signed in to change notification settings - Fork 208
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
yarn create @agoric/dapp demo
fails with yarn 4 (nodeLinker pnp)
#9852
Comments
I suspect the solve here is adding a I also suspect we will need to tell CI (which currently uses yarn 1.22.x) to run this with yarn 4.x, and also add a test like: diff --git a/packages/create-dapp/test/sanity.test.js b/packages/create-dapp/test/sanity.test.js
index f4424d587..4e6395a68 100644
--- a/packages/create-dapp/test/sanity.test.js
+++ b/packages/create-dapp/test/sanity.test.js
@@ -15,4 +15,5 @@ test('sanity', async t => {
t.is(await myMain(['--help']), 0, '--help exits zero');
t.is(await myMain(['--version']), 0, '--version exits zero');
t.is(await myMain(['--zorgar']), 1, 'unknown flag fails');
+ t.is(await myMain(['demo']), 0, 'create-dapp demo exits 0');
}); |
Note: #451 is a potential solution, but probably the one with the longest lead time. It seems like we have two interim solutions, the second of which might close this issue:
|
I am currently using verdaccio to proxy a private locally-hosted registry and overriding the |
So just adding a It got rid of the pnp error but it threw the following:
This^ was resolved by bumping agoric dependency to I believe the user triggering What do you think/suggest @0xpatrickdev ? With this^, we would need to update the docs accordingly as well to mention those steps. |
@mujahidkay thanks for the great analysis here. I responded in the PR |
closes: #XXXX refs: #9852 ## Description As described in the issue linked above, currently, if a user has yarn4 and they run `yarn create @agoric/dapp demo` the command fails because it uses pnp as the linker by default. The correct way to go about it imo is to properly document that if a user is using yarn4, they have to configure it to use `node-modules` as its `nodeLinker`. This can either be done by creating a `.yarnrc.yml` in the directory they are supposedly running the `yarn create` command, or by globally configuring it via `yarn config set nodeLinker node-modules` bumping the agoric package is needed for yarn4 otherwise it throws an [error](#9852 (comment)) ## Steps to Test ### Publishing to a local, private registry 1. install and start verdaccio 2. set npm registry server to the localhost address exposed by verdaccio ``` npm config set registry http://localhost:4873/ ``` 3. inside the create-dapp folder, run ``` npm publish ``` you may have to auth a user. You can use `npm adduser` and provide test username, password (for verdaccio). You can also explicitly publish to your private registry using `npm publish --registry=http://localhost:4873` ### Downloading the package from local registry 1. Set nodeLinker to node-modules: ``` yarn config set nodeLinker node-modules ``` 2. point npmRegistryServer to localhost: ``` yarn config get npmRegistryServer ``` 3. add localhost to unsafe http whitelist: ``` yarn config set unsafeHttpWhitelist 'localhost' ``` 4. pull the package using ``` yarn create @agoric/dapp demo ``` Ensure the package being pulled is the one you published by matching the package version. P.S. the above can be achieved by using a `.yarnrc.yml` with the same configuration as well. But for the above instructions, please don't forget to set them to their defaults after testing :) ### Security Considerations ### Scaling Considerations ### Documentation Considerations Add a section on docs site while setting up yarn to properly configure nodeLinker ### Testing Considerations TODO: add CI step to test package download using different yarn versions via [verdaccio](https://verdaccio.org/) ### Upgrade Considerations
I cannot reproduce this error, for me after setting the linker, it inits the dapp correctly
The fact that we ended up resolving to |
Thanks @mhofman for the insights! I think I understand what happened here. For me, it was pulling Do you know why the |
Our release process currently does not have a well defined way to merge back the changes of the release branch into master, which means that we've not been able to incorporate the version and generated changelog changes of releases back into trunk. It is partially blocked technically on #9490, but we do need a process in place anyway. |
Describe the bug
yarn create @agoric/dapp demo
fails with yarn 4. The error message suggests it might be due to Plug'n'Play (the defaultnodeLinker
setting).To Reproduce
Steps to reproduce the behavior:
Expected behavior
Users should be able to use
yarn create @agoric/dapp
with yarn 4Platform Environment
what OS are you using? what version of Node.js?
OS X, Node 18.18. Also fails on 18.20
is there anything special/unusual about your platform?
No
what version of the Agoric-SDK are you using? (run
git describe --tags --always
)create-dapp depends on
"agoric": "^0.21.1"
The text was updated successfully, but these errors were encountered: