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

Uncaught ReferenceError: module is not defined #372

Closed
fruwe opened this issue Feb 19, 2016 · 2 comments
Closed

Uncaught ReferenceError: module is not defined #372

fruwe opened this issue Feb 19, 2016 · 2 comments

Comments

@fruwe
Copy link

fruwe commented Feb 19, 2016

Hi there, I am not really sure where to post this, because it occurs when I use your gem, bundled by rails-assets. I guess it stopped working, because bower got (for no apparent reason) deleted from your repository.

Related issue: #357

Occurred after upgrading from 7.1.1 to 8.3.0. I am using rails-assets.

Steps to reproduce using rails 4.2.5.1, ruby 2.2.3p173

  1. rails new test_app --no-skip-git --skip-active-record --skip-spring --skip-turbolinks --skip-test-unit
  2. cd test_app/
  3. echo "gem 'rails-assets-intl-tel-input', source: 'https://rails-assets.org'" >> Gemfile
  4. bundle install
  5. echo "//= require intl-tel-input" >> app/assets/javascripts/application.js
  6. echo "class HelloController < ApplicationController; def show; render text:'', layout: true; end; end" > app/controllers/hello_controller.rb
  7. echo "Rails.application.routes.draw do; root 'hello#show'; end" > config/routes.rb
  8. rails s
  9. open http://localhost:3000/
  10. check the console (in my case Chrome's console) - you will see this error.

Also the auto-generated gem mentions this:

This component doesn't define main assets in bower.json.\nPlease open new pull request in component's repository:\nhttps://github.com/Bluefieldscom/intl-tel-input

Expected behaviour

  1. No error in console
  2. Plugin works normally

Actual behaviour

Javascript error "Uncaught ReferenceError: module is not defined" causes this plugin not to work

Initialisation options

@jackocnr
Copy link
Owner

My bad, bower.json was removed when we stopped using Bower for our build process. I have re-added it in v8.3.1. Thanks for letting me know!

@fruwe
Copy link
Author

fruwe commented Feb 19, 2016

Wow that was quick, thanks

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