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
I am trying to use an html to jsx converter(https://github.com/littlehaker/html-to-jsx) with motto. I'm trying to run the example code within motto but code keeps looking for a certain "util.js" file.
Ran npm init
npm install --save html-to-jsx
I copied the htmltojsx/example.js to a file called html2jsx.js in my app directory
Created the following test in main_test.go
Run go test -run=TestNodeIntegration
func TestNodeIntegration(t *testing.T) {
m := motto.New()
m.AddPath("node_modules")
m.AddPath("node_modules/util")
v, err := m.Run("html2jsx.js")
if err != nil {
t.Error(err)
}
i, _ := v.ToString()
fmt.Println(i)
}
I added the following log statement in motto/module.go
Line 128: fmt.Println(name, choices)
Running the test yielded the following code repeated over and over.
Can't find exactly where it is trying to load util. I tried running npm install util but that did not change anything. I was Curious if it is trying to load node module. I saw nodego but could not figure out how to use the nodego environment within motto.
The text was updated successfully, but these errors were encountered:
I am trying to use an html to jsx converter(https://github.com/littlehaker/html-to-jsx) with motto. I'm trying to run the example code within motto but code keeps looking for a certain "util.js" file.
I added the following log statement in motto/module.go
Line 128:
fmt.Println(name, choices)
Running the test yielded the following code repeated over and over.
Can't find exactly where it is trying to load util. I tried running
npm install util
but that did not change anything. I was Curious if it is trying to load node module. I saw nodego but could not figure out how to use the nodego environment within motto.The text was updated successfully, but these errors were encountered: