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

cli broken since beta.11 #34

Closed
panva opened this issue Jul 19, 2022 · 2 comments · Fixed by #50
Closed

cli broken since beta.11 #34

panva opened this issue Jul 19, 2022 · 2 comments · Fixed by #50
Assignees

Comments

@panva
Copy link
Contributor

panva commented Jul 19, 2022

Having a file run is not working with the latest betas. some.mjs in my example does just console.log('foo')

✗ npm i edge-runtime@1.1.0-beta.11
✗ npx edge-runtime some.mjs       
foo
✗ npm i edge-runtime@1.1.0-beta.15
✗ npx edge-runtime some.mjs       
Error: Cannot find module 'tr46'
Require stack:
- /repo/node_modules/@edge-runtime/vm/dist/edge-vm.js
- /repo/node_modules/@edge-runtime/vm/dist/index.js
- /repo/node_modules/edge-runtime/dist/edge-runtime.js
- /repo/node_modules/edge-runtime/dist/cli/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1022:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at addPrimitives (/repo/node_modules/@edge-runtime/vm/dist/edge-vm.js:79:37)
    at Object.extend (/repo/node_modules/@edge-runtime/vm/dist/edge-vm.js:17:38)
    at new VM (/repo/node_modules/@edge-runtime/vm/dist/vm.js:23:92)
    at new EdgeVM (/repo/node_modules/@edge-runtime/vm/dist/edge-vm.js:13:9)
    at new EdgeRuntime (/repo/node_modules/edge-runtime/dist/edge-runtime.js:18:9)
    at main (/repo/node_modules/edge-runtime/dist/cli/index.js:37:21) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/repo/node_modules/@edge-runtime/vm/dist/edge-vm.js',
    '/repo/node_modules/@edge-runtime/vm/dist/index.js',
    '/repo/node_modules/edge-runtime/dist/edge-runtime.js',
    '/repo/node_modules/edge-runtime/dist/cli/index.js'
  ]
}

Edit: likewise, globals are missing in REPL

➜  ✗ npx edge-runtime
ƒ => fetch
Uncaught ReferenceError: fetch is not defined
ƒ => crypto
Uncaught ReferenceError: crypto is not defined
ƒ => atob
Uncaught ReferenceError: atob is not defined
ƒ => btoa
Uncaught ReferenceError: btoa is not defined
@panva
Copy link
Contributor Author

panva commented Jul 22, 2022

reproduce outstanding issues with

gh repo clone panva/oauth4webapi
cd oauth4webapi
npm clean-install
npm install edge-runtime@latest
npm run tap:edge-runtime

This is testing a considerable chunk of the aforementioned globals.

@panva
Copy link
Contributor Author

panva commented Jul 22, 2022

TypeError: define_process_default.nextTick is not a function

That's the most i can get out of the failure there.

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

Successfully merging a pull request may close this issue.

2 participants