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

TypeError: Module specifier, 'application' does not start with "/", "./", or "../" #182

Closed
gabrieelgomez opened this issue Mar 31, 2023 · 3 comments

Comments

@gabrieelgomez
Copy link

gabrieelgomez commented Mar 31, 2023

Hello! I got this error while starting my recent rails new app on 7.0.4.2 and ruby 3.2.1

image

I just did a hello world in the root path and when I see the logs I get this

Gemfile

gem "importmap-rails"

config/importmap.rb

pin "application", preload: true
pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
pin_all_from "app/javascript/controllers", under: "controllers"
@gabrieelgomez gabrieelgomez changed the title i have the same issue but with i only set up my app server with bin/rails server -b 0.0.0.0 `TypeError: Module specifier, 'application' does not start with "/", "./", or "../" `TypeError: Module specifier, 'application' does not start with "/", "./", or "../" Mar 31, 2023
@gabrieelgomez gabrieelgomez changed the title `TypeError: Module specifier, 'application' does not start with "/", "./", or "../" TypeError: Module specifier, 'application' does not start with "/", "./", or "../" Mar 31, 2023
@morgoth
Copy link
Member

morgoth commented Mar 31, 2023

This can be ignored as the next line says in the console output

const onpolyfill = esmsInitOptions.onpolyfill ? globalHook(esmsInitOptions.onpolyfill) : () => {
console.log('%c^^ Module TypeError above is polyfilled and can be ignored ^^', 'font-weight:900;color:#391');
};

What browser do you use and which version? Vide https://caniuse.com/?search=importmap

@morgoth
Copy link
Member

morgoth commented Apr 14, 2023

@gabrieelgomez Since this is expected behavior can you close the issue?

@SylarRuby
Copy link

Yup. Can confirm nothing breaks.

@dhh dhh closed this as completed Apr 23, 2023
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

4 participants