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

Reach run gives error on latest version #1565

Closed
nstanford5 opened this issue Mar 1, 2023 Discussed in #1564 · 2 comments
Closed

Reach run gives error on latest version #1565

nstanford5 opened this issue Mar 1, 2023 Discussed in #1564 · 2 comments

Comments

@nstanford5
Copy link
Contributor

Discussed in #1564

Originally posted by FrancescoMasaia March 1, 2023
Describe the error

Reach Latest runner gives me error on execution

To Reproduce

Please include the program(s) that produce the unexpected behavior from Reach. If the error is in the compiler or during verification, you just need to include the .rsh file. If it is while the program is running, you should also include the .mjs file. It is easiest to link the file after posting them on gist.github.com, but if you don't want to share them publicly, please contact Jay McCarthy on our Discord server --- https://discord.gg/AZsgcXu --- and get them to him privately or he can help you reduce the code.

I was trying to use the overview example to start learning about Reach.
But when i send the reach run command it gives me the current error:

[+] Building 0.4s (7/7) FINISHED                                                                                                                                                                                                                                                   
 => [internal] load .dockerignore                                                                                                                                                                                                                                             0.0s
 => => transferring context: 75B                                                                                                                                                                                                                                              0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                          0.0s
 => => transferring dockerfile: 329B                                                                                                                                                                                                                                          0.0s
 => [internal] load metadata for docker.io/reachsh/runner:0.1.13                                                                                                                                                                                                              0.4s
 => [1/2] FROM docker.io/reachsh/runner:latest@sha256:38d376ad687502bb785b14a3291f96cef53f3771d1faf1ca3727a0f0f0fee80e                                                                                                                                                        0.0s
 => [internal] load build context                                                                                                                                                                                                                                             0.0s
 => => transferring context: 975B                                                                                                                                                                                                                                             0.0s
 => CACHED [2/2] COPY . /app                                                                                                                                                                                                                                                  0.0s
 => exporting to image                                                                                                                                                                                                                                                        0.0s
 => => exporting layers                                                                                                                                                                                                                                                       0.0s
 => => writing image sha256:afac566a2c1c308d5469c15c5c0f04f5f0e587eb63506d58e9cbe33a80a2df13                                                                                                                                                                                  0.0s
 => => naming to docker.io/reachsh/reach-app-tutorial-1:0.1.13                                                                                                                                                                                                                0.0s
Creating 2023-03-01t13-29-37z-qdiu_reach-app-tutorial-1_run ... done

> index
> node --experimental-modules --unhandled-rejections=strict index.mjs

file:///app/index.mjs:1
import { loadStdlib } from '@reach-sh/stdlib';
         ^^^^^^^^^^
SyntaxError: Named export 'loadStdlib' not found. The requested module '@reach-sh/stdlib' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@reach-sh/stdlib';
const { loadStdlib } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:127:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:191:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:337:24)
    at async loadESM (node:internal/process/esm_loader:88:5)
    at async handleMainPromise (node:internal/modules/run_main:61:12)
ERROR: 1

I was trying to test this program inside the Algo network
Expected behavior

Please describe what you expected or hoped would happen.
It's very strange that my computer gives error, I saw that the execution is done inside a docker container that i think have node and npm installed by default not using my machine version.

Extra information

What version of Reach are you using? You can run reach version or reach hashes to find out.
Reach version is 0.1.13

@nstanford5
Copy link
Contributor Author

I've been able to reproduce this issue with just the reach init boilerplate

./reach hashes - 25c0225
./reach version - 0.1.13

@jeapostrophe
Copy link
Collaborator

I just released a fixed version.

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