You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go run main.go
panic: TypeError: Please enable require for this runtime using new(require.Require).Enable(runtime)
goroutine 1 [running]:
github.com/dop251/goja_nodejs/require.Require(0x140001ba960?, {0x102737917, 0x7})
/Users/patrick/go/pkg/mod/github.com/dop251/goja_nodejs@v0.0.0-20220706223936-8bb8eec2f26a/require/module.go:198 +0x144
github.com/dop251/goja_nodejs/console.Enable(0x14000198000?)
/Users/patrick/go/pkg/mod/github.com/dop251/goja_nodejs@v0.0.0-20220706223936-8bb8eec2f26a/console/module.go:75 +0x30
main.main()
/Users/patrick/prog/go/goja/main.go:10 +0x38
exit status 2
but
new(require.Require).Enable(runtime)
does not seem to be valid Go (require.Require (value of type func(runtime *goja.Runtime, name string) goja.Value) is not a type).
What can I do to load the console module?
The text was updated successfully, but these errors were encountered:
Discussed in dop251/goja#404
Originally posted by pgundlach July 12, 2022
I came across dop251/goja#116 to enable
console.log()
, but when I use the command, I get an errorreturns (
go run main.go
)but
does not seem to be valid Go (require.Require (value of type func(runtime *goja.Runtime, name string) goja.Value) is not a type).
What can I do to load the console module?
The text was updated successfully, but these errors were encountered: