Three.js import map not working in Firefox

Firefox brings this error message:

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

The line it refers to is

import { ... } from /*'three'*/'blob:https://[URL]/c945bbba-09f5-454f-b2a4-508d3d70f89a';

which is the Firefox translation of

import { ... } from 'three';

referring to the import map in the index.html file:

	<!-- Import maps polyfill -->
	<!-- Remove this when import maps will be widely supported -->
	<script async src=""></script>

	<script type="importmap">
			"imports": {
				"three": "./vendor/three/build/three.module.js"

which works perfectly fine in Google Chrome browser. Any ideas?

Although a polyfill is used, Firefox still reports a console error. You can safely ignore it. The import should still work like in the official examples.

Yes, it should. But it doesn’t. All I get is a black screen.

Can you please demonstrate with a live example what you are doing?

Btw, there was another error further down which I had forgotten to mention:

Uncaught TypeError: undefined has no properties
    InnerModuleEvaluation self-hosted:2393
    evaluation self-hosted:2354

Sure, take a look here using Chrome:

This error refers to the line


which adds the ground object with the grass shader to the scene.

I have tested the online version in Chrome, Chrome Canary, Chrome Mobile Android, Opera, Opera Mobile Android, Edge, and it worked. I’ve tested it in Firefox, Firefox Mobile Android, Chrome Mobile iOS, Safari Mobile, and it didn’t work - although other projects of mine did, like this one:
I’ll take a closer look at my code, but I honestly don’t think that it’s my mistake, because if it were, it wouldn’t run in any browser. Since it’s repeatable it has to be a bug of some kind, I jst don’t exactly know where yet.

I’ve just realized that another project of mine,, which has the same code base, also doesn’t work in Firefox anymore, although it does in Chrome, and although I didn’t change any of its code since weeks. It even throws the same error. So, yup, that seems to be a Firefox bug. I just don’t understand why all the other browsers I have tested also didn’t work.

If you think so, please report it here:

1 Like

It could also be a bug in the es-module-shims.js import mapping, since several different browsers had problems. No?

Probably, yes.

Can you tell me where to file a bug report for this module?

Just in case anyone wants to follow up or contribute:

I tried to follow up through the different github pages but really didn’t get it…
It’s related to Polyfill, and some cycles stuff(?). Is there a solution to it or workaround available?