Skip to content

Uncaught TypeError: Error resolving module specifier “application” on Rails 7 in Firefox #46

@murdoch

Description

@murdoch

I see the following 2 console warnings in FireFox after creating a rails 7 app.


The first warning:

Uncaught TypeError: Error resolving module specifier “application”. Relative module specifiers must start with “./”, “../” or “/”.

The warning points to the following line of code:

<script type="module">import "application"</script>

Any javascript I place in application.js appears to work as expected. Turbolinks and Trix work correctly too.


The second warning:

asm.js type error: Disabled because no suitable wasm compiler is available

The above warning points to the es shim js file.


These warnings only appear in Firefox.

Screen Shot 2021-10-02 at 2 15 53 AM


To reproduce:

  • rails new internetwebsite
  • rails g scaffold posts title
  • rails db:migrate
  • rails s
  • open localhost:3000/posts

Additional info:

  • Using Ruby 3.0.2
  • Not using yarn/node/esbuild etc
  • Happens with both the alpha gems
  • Happens when pulling rails directly from github
  • No warnings in Chrome or Safari
  • MacOs Big Sur 11.6
  • FireFox 92.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions