esm.sh icon indicating copy to clipboard operation
esm.sh copied to clipboard

Error with import('https://esm.sh/lume').then(console.log)

Open trusktr opened this issue 4 years ago • 3 comments

import('https://esm.sh/lume').then(console.log)

gives

Uncaught (in promise) ReferenceError: __cassowary_parser is not defined

Any idea why?

trusktr avatar Mar 23 '21 22:03 trusktr

@trusktr seems it is esbuild's issue, i will find out what happend, thanks

ije avatar Mar 29 '21 18:03 ije

Trying to import lume results in this:

➜ deno run --allow-net test.ts
Download https://cdn.esm.sh/v47/@lume/[email protected]/dist/html.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/controls/OrbitControls.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/Three.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/cameras/PerspectiveCamera.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/cameras/Camera.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/renderers/webgl/WebGLRenderLists.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/math/Color.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/Material.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/core/Object3D.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/cameras/OrthographicCamera.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/math/Quaternion.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/textures/Texture.js.d.ts
Download https://cdn.esm.sh/v47/@lume/[email protected]/dist/dom.js.d.ts
Download https://cdn.esm.sh/v47/@lume/[email protected]/es/AutoLayout.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/objects/Mesh.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/objects/Points.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/core/BufferGeometry.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/core/Geometry.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/objects/Group.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/ColladaLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/GLTFLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/scenes/Scene.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/math/Vector3.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/lights/PointLight.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/lights/Light.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/lights/AmbientLight.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/OBJLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/MTLLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/FBXLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/DRACOLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/MeshPhongMaterial.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/MeshLambertMaterial.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/PointsMaterial.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/ShaderMaterial.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/MeshBasicMaterial.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/geometries/BoxGeometry.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/PLYLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/geometries/PlaneGeometry.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/geometries/SphereGeometry.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/controls/OrbitControls.js.d.ts
Download https://cdn.esm.sh/v47/@lume/[email protected]/dist/html.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/Three.js.d.ts
Download https://cdn.esm.sh/v47/@lume/[email protected]/es/AutoLayout.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/core/Object3D.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/objects/Group.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/ColladaLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/core/BufferGeometry.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/GLTFLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/math/Vector3.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/scenes/Scene.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/cameras/PerspectiveCamera.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/objects/Points.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/Material.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/objects/Mesh.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/math/Color.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/cameras/OrthographicCamera.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/math/Quaternion.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/renderers/webgl/WebGLRenderLists.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/cameras/Camera.js.d.ts
Download https://cdn.esm.sh/v47/@lume/[email protected]/dist/dom.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/textures/Texture.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/core/Geometry.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/lights/Light.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/lights/AmbientLight.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/lights/PointLight.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/MeshPhongMaterial.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/MeshLambertMaterial.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/OBJLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/MTLLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/FBXLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/DRACOLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/examples/jsm/loaders/PLYLoader.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/geometries/BoxGeometry.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/geometries/PlaneGeometry.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/geometries/SphereGeometry.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/PointsMaterial.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/ShaderMaterial.js.d.ts
Download https://cdn.esm.sh/v47/[email protected]/src/materials/MeshBasicMaterial.js.d.ts
error: Uncaught (in promise) TypeError: The requested module '/v47/[email protected]/deno/stream-browserify.js' does not provide an export named 'Readable'

v1rtl avatar Sep 05 '21 14:09 v1rtl

on v50 I get this:

Download http://localhost:3333/v50/@lume/[email protected]/dist/html.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/Three.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/controls/OrbitControls.js...d.ts
Download http://localhost:3333/v50/@lume/[email protected]/es/AutoLayout.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/cameras/PerspectiveCamera.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/renderers/webgl/WebGLRenderLists.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/core/Object3D.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/cameras/Camera.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/cameras/OrthographicCamera.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/math/Color.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/Material.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/math/Quaternion.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/lights/PointLight.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/lights/AmbientLight.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/lights/Light.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/core/BufferGeometry.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/core/Geometry.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/textures/Texture.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/scenes/Scene.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/GLTFLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/objects/Group.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/ColladaLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/math/Vector3.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/objects/Mesh.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/objects/Points.js...d.ts
Download http://localhost:3333/v50/@lume/[email protected]/dist/dom.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/geometries/BoxGeometry.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/geometries/PlaneGeometry.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/PLYLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/geometries/SphereGeometry.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/MeshBasicMaterial.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/ShaderMaterial.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/MeshLambertMaterial.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/MeshPhongMaterial.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/PointsMaterial.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/OBJLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/MTLLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/DRACOLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/FBXLoader.js...d.ts
Download http://localhost:3333/v50/@lume/[email protected]/dist/html.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/Three.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/controls/OrbitControls.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/cameras/PerspectiveCamera.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/objects/Mesh.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/Material.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/objects/Points.js...d.ts
Download http://localhost:3333/v50/@lume/[email protected]/es/AutoLayout.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/core/BufferGeometry.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/core/Geometry.js...d.ts
Download http://localhost:3333/v50/@lume/[email protected]/dist/dom.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/lights/Light.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/lights/AmbientLight.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/lights/PointLight.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/math/Quaternion.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/cameras/Camera.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/cameras/OrthographicCamera.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/core/Object3D.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/math/Color.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/renderers/webgl/WebGLRenderLists.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/textures/Texture.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/scenes/Scene.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/GLTFLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/objects/Group.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/ColladaLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/math/Vector3.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/MeshPhongMaterial.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/MeshLambertMaterial.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/DRACOLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/FBXLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/OBJLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/MTLLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/ShaderMaterial.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/MeshBasicMaterial.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/materials/PointsMaterial.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/geometries/PlaneGeometry.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/geometries/SphereGeometry.js...d.ts
Download http://localhost:3333/v50/[email protected]/examples/jsm/loaders/PLYLoader.js...d.ts
Download http://localhost:3333/v50/[email protected]/src/geometries/BoxGeometry.js...d.ts
error: Uncaught (in promise) TypeError: The requested module '/v50/[email protected]/deno/html/dist/html.js' does not provide an export named 'default'

v1rtl avatar Sep 14 '21 07:09 v1rtl

this should work now

ije avatar Nov 16 '23 13:11 ije

@talentlessguy why would stream-browserify be in there like that? No such import is needed with vanilla Lume modules. Here's an example importmap that works locally: https://github.com/lume/lume/blob/c86ca7027e86bc5d774e315adf46308ad5ffb5bf/examples/importmap.js#L3-L23

trusktr avatar Nov 29 '23 06:11 trusktr

Confirmed, latest import('https://esm.sh/[email protected]').then(console.log) is working. Thanks!

trusktr avatar Nov 29 '23 06:11 trusktr

@talentlessguy why would stream-browserify be in there like that? No such import is needed with vanilla Lume modules. Here's an example importmap that works locally: https://github.com/lume/lume/blob/c86ca7027e86bc5d774e315adf46308ad5ffb5bf/examples/importmap.js#L3-L23

probably it's an esm.sh polyfill for the browser but I'm not sure

v1rtl avatar Nov 29 '23 07:11 v1rtl