Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

npx zos throws: Cannot read property 'UriResolver' of undefined #1046

Closed
vibern0 opened this issue Jun 25, 2019 · 8 comments
Closed

npx zos throws: Cannot read property 'UriResolver' of undefined #1046

vibern0 opened this issue Jun 25, 2019 · 8 comments
Labels

Comments

@vibern0
Copy link

vibern0 commented Jun 25, 2019

This error only happens when running zos locally, like npx zos init.
This happens since version 2.2.0

nodejs: v10.15.3
truffle: v5.0.13
solc: v0.5.8

@jbcarpanelli
Copy link
Contributor

HI @obernardovieira, could you please specify exactly which version of zos and zos-lib are you currently using?

@jbcarpanelli jbcarpanelli added the status:more-info-required More info required to work this issue label Jun 25, 2019
@vibern0
Copy link
Author

vibern0 commented Jun 25, 2019

Last time I've used zos locally (with npx) I was in 2.2.0. Usually, I use the global installation (although I only have one at a time). But It happened yesterday with zos and zos-lib in 2.4.0
But then I've tried some previous versions, like 2.2.0 and the same happened.

After writing this above part of the comment I decided to try again. Yesterday I left the version 2.2.2 installed, and it now worked (It wasn't working yesterday) so I updated to 2.4.0 and I've got an error that I've seen yesterday as well Cannot read property 'UriResolver' of undefined. Then, downgraded to 2.2.2 and got the initial error zos_lib_1.Logger is not a constructor.

@wmitsuda
Copy link

I've just created a new project using zos 2.4 and I'm getting the same error with npx. However, I've copied the yarn.lock file from another existing working project and it works.

I think there is something among the current dependencies that is breaking zos if installing from scratch at this exact moment.

@wmitsuda
Copy link

Right now, you can reproduce it using these steps:

npm init -y
yarn add -D zos zos-lib
npx zos

You will get the Cannot read property 'UriResolver' of undefined error.

@jbcarpanelli jbcarpanelli removed the status:more-info-required More info required to work this issue label Jun 25, 2019
@jbcarpanelli
Copy link
Contributor

@obernardovieira, @wmitsuda thanks for reporting this 👍. It seems that this only occurs when installing zos and zos-lib using yarn. Could you please try installing them using npm instead? In the meantime we will dig deeper into this issue and fix it soon!

@wmitsuda
Copy link

Oh... damn yarn... but ok, I can use a working yarn.lock from another project for now.

@jbcarpanelli jbcarpanelli changed the title zos_lib_1.Logger is not a constructor npx zos throws: Cannot read property 'UriResolver' of undefined Jun 29, 2019
@wmitsuda
Copy link

wmitsuda commented Jul 3, 2019

I've just upgraded to zos 2.4.1 and I do confirm it is now working perfectly with yarn.

@jbcarpanelli
Copy link
Contributor

Thanks for confirming this @wmitsuda! I'm closing this issue 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants