You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeError: I is not a function when calling loadSpz/loadSpzFromUrl` in Node.js and Browser (@spz-loader/core@0.2.0) #70
When attempting to load an .spz file using either loadSpz or loadSpzFromUrl from @spz-loader/core@0.2.0, a runtime error occurs. This error happens both when running the library in a browser environment (specifically tested within an A-Frame component loaded via <script type="module"> from esm.sh) and when running it directly in a standard Node.js environment.
Error Message & Stack Trace:
TypeError: I is not a function
at file:///path/to/project/node_modules/@spz-loader/core/dist/index.js:11:16
at async OI (file:///path/to/project/node_modules/@spz-loader/core/dist/index.js:799:13)
Steps to Reproduce (Node.js):
Install the package: npm install @spz-loader/core@0.2.0 or pnpm add @spz-loader/core@0.2.0
Create a simple index.js file:
import{loadSpzFromUrl}from'@spz-loader/core';// Or: import { loadSpz } from '@spz-loader/core'; and use fetch + loadSpz(buffer)constspzUrl='https://huggingface.co/datasets/christenJacquottet/gaussian-splats/resolve/main/train.spz';// Example URLasyncfunctionrunTest(){console.log(`Attempting to load SPZ from: ${spzUrl}`);try{// Using loadSpzFromUrl (also fails with fetch + loadSpz(buffer))constsplat=awaitloadSpzFromUrl(spzUrl);console.log('SPZ Loaded successfully! Points:',splat.numPoints);}catch(error){console.error('Error loading SPZ file:',error);}}runTest();
Run the script: node index.js
Observe the TypeError: I is not a function error in the console.
Environment:
Package:@spz-loader/core version 0.2.0
Node.js: v20.17.0
**Browser Chrome, running within A-Frame Version 1.5.0 and 8th Wall. Library loaded via <script type="module" src="https://esm.sh/@spz-loader/core@0.2.0">.
Since the error occurs identically in Node.js, it strongly indicates the issue lies within the package's build/bundling rather than the specific browser or A-Frame environment.
Activity