Skip to content
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 serve:extdev => 'NETWORK' is not recognized as an internal or external command, operable program or batch file. #71

Open
Swahgner opened this issue May 9, 2022 · 1 comment

Comments

@Swahgner
Copy link

Swahgner commented May 9, 2022

When running yarn serve:extdev I'm getting the following output:

yarn run v1.22.18
$ NETWORK=extdev yarn run serve
'NETWORK' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I have followed all previous steps

@robotzero1
Copy link

Looking at contract.js , NETWORK is an environmental variable...

    if (process.env.NETWORK == 'extdev') {
      return '9545242630824'
    }

So reading here: https://stackoverflow.com/questions/25112510/how-to-set-environment-variables-from-within-package-json

it appears on Windows you need to change line 15 of package.json to:

"serve:extdev": "set NETWORK=extdev&&yarn run serve",

using env instead of set didn't work for me.

After that it all seems to work...

image

Not sure why React and Webpack was used if this is the entire interface for the example?

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

No branches or pull requests

2 participants