zeppelinos / zos-cli

:warning: Deprecated repo in favour of https://github.com/zeppelinos/zos
https://zeppelinos.org/
101 stars 25 forks source link

TypeError: Cannot create property 'stdlib' on string 'zos.json(@1.1.0) #333

Closed roson9527 closed 6 years ago

roson9527 commented 6 years ago

node: 10.6.0 truffle: 4.1.13

zos.json

{
  "name": "gar",
  "version": "0.1.0",
  "contracts": {
    "RBACWithAdmin": "RBACWithAdmin",
  },
  "stdlib": {
    "name": "openzeppelin-zos",
    "version": "1.9.1"
  }
}

package.json

"dependencies": {
    "chai": "^4.1.2",
    "openzeppelin-zos": "^1.9.1",
    "zos": "^1.1.0"
  },

test.js

contract('test', async (accounts) => {
    let owner = accounts[1];
    beforeEach(async () => {
        this.app = await TestApp('zos.json', {
            from: owner
        });
    });

    it('testA', async () => {
    });
});

cmd

NODE_ENV=test truffle test

when zos version is 1.0.0 it's working :(

spalladino commented 6 years ago

@roson9527 seems the docs are wrong w.r.t. TestApp usage. Can you try removing the first parameter (ie zos.json) from the call to TestApp? I'll work on a fix (on either docs or API, or both) in the meantime. Thanks!

joecoope commented 6 years ago

Hey gentlemen, I was researching your project a few weeks ago and and somehow triggered email updates on your work. I have tried muting the thread but they continue.. Can you help? Its clogging my inbox and tbh I don't code so I don't really understand what your talking about. Lol Regards Joe Sent from my Boost Zume 5 on the Telstra Mobile Network On 24 Jul 2018 5:05 AM, Santiago Palladino notifications@github.com wrote:

@roson9527https://github.com/roson9527 seems the docs are wrong w.r.t. TestApp usage. Can you try removing the first parameter (ie zos.json) from the call to TestApp? I'll work on a fix (on either docs or API, or both) in the meantime. Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/zeppelinos/zos-cli/issues/333#issuecomment-407167054, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ai7ukqapv5NHK6XNt3_ZkI-qzlbqfjJQks5uJh56gaJpZM4VaaP_.

spalladino commented 6 years ago

@joecoope make sure you are not watching or following the repository or organization, even if you have muted individual threads. If the issue persists, please contact Github directly, as there is nothing we can do from our end.

kabriel commented 6 years ago

getting this issue when i updated to 1.1 as well

spalladino commented 6 years ago

@kabriel please invoke TestApp as TestApp(null, { from: yourAccount }). The first parameter will be dropped in the next release with #335. We have also updated the documentation in https://github.com/zeppelinos/zos-docs/pull/91.

joecoope commented 6 years ago

OK, thanks. Sent from my Boost Zume 5 on the Telstra Mobile Network On 24 Jul 2018 11:34 PM, Santiago Palladino notifications@github.com wrote:

@joecoopehttps://github.com/joecoope make sure you are not watching or following the repository or organization, even if you have muted individual threads. If the issue persists, please contact Github directlyhttps://github.com/contact, as there is nothing we can do from our end.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/zeppelinos/zos-cli/issues/333#issuecomment-407408489, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ai7uksCuC6ZGyMfp2HP96rwxWIrO-xM5ks5uJyJ3gaJpZM4VaaP_.