-
Notifications
You must be signed in to change notification settings - Fork 148
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
module_type: nil causes "NIL is not supported by runtime" #297
Comments
What is your |
i followed the 2.0 upgrade doc, so this is config/initializers/js_routes.rb
|
I can't reproduce it locally because JS environments are too diverse. For the sake of debugging can you change the following method locally inside your copy of isSupported() {
console.log(Root);
console.log(Namespace);
console.log(!!Root);
return true;
}, Line 77 in dba9abe
And then restart the project and tell me if it fixes your issue and what is the output in console? |
I made the changes and this is the console output
|
I tried to fix an issue. Can you try the gem from current master if it solves the problem? |
I tried the gem from current master, and getting this error in
|
See, there is a kind of problem within webpacker environment: top level Overall I do not recommend a configuration like this. It is not environment agnostic. You should try instead: JsRoutes.setup do |config|
config.module_type = nil
end const Routes = <%= JsRoutes.generate %>
export Routes; |
No followup, closing. Feel free to reopen. |
I'm experiencing this same error as issue #292 , with version 2.2.2
here's the stack trace
The text was updated successfully, but these errors were encountered: