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

error when running a react-router v7 app with @splinetool/runtime installed #17014

Open
miguelvictor opened this issue Feb 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@miguelvictor
Copy link

miguelvictor commented Feb 3, 2025

What version of Bun is running?

1.2.2+c1708ea6a

What platform is your computer?

Darwin 24.2.0 arm64 arm

What steps can reproduce the bug?

  1. create a new react router v7 app like in https://reactrouter.com/start/framework/installation
  2. install the @splinetool/runtime package
  3. use it somewhere like so <Spline scene="/assets/spline/scene.splinecode" />
  4. initiate build with bun bun --bun run build
  5. start the app with bun bun --bun run start

What is the expected behavior?

the react-router app should run normally

What do you see instead?

$ react-router-serve ./build/server/index.js
6665 | vec3 resultColor = mix(mix(vColor, normal, 0.2), vec3(contrastDepth), 0.4);
6666 | gl_FragColor = vec4(resultColor, vColor.r);
6667 | gl_FragColor = vec4(resultColor, vColor.r);
6668 | }
6669 | `,Jx=new Je({vertexShader:gZ,fragmentShader:yZ,uniforms:{depthContrast:{value:1}}});var IL=new rr,DL=new k,$x=class extends nw{constructor(e){super(e);this._pixelRatio=this.getPixelRatio();this.viewportWidth=1;this.viewportHeight=1;this.resolution=new k;this.dummyCamera=new Er;this.sceneTransitionDuration=0;this.sceneTransitionTimeRemaining=-1;this.isXRCopyPassSet=!1;this.clear=(e=!0,r=!0,i=!0)=>{let s=this.getContext(),o=0;e&&(o|=s.COLOR_BUFFER_BIT),r&&(o|=s.DEPTH_BUFFER_BIT),i&&(o|=s.STENCIL_BUFFER_BIT),s.clear(o),s.clearBufferfv(s.COLOR,1,[0,0,0,1])};this.pipeline=new Jm(this,e?.needsDOFResize??!1),this.autoClear=!1;let r=this.setPixelRatio.bind(this),i=this.setSize.bind(this);this.shadowMap.enabled=!0,this.shadowMap.type=qy,this.dummyCamera.matrixAutoUpdate=!1,this.domElement.removeAttribute("data-engine");let s=this.getContext();if(s&&"drawingBufferColorSpace"in s)try{s.drawingBufferColorSpace="display-p3"}catch(o){console.warn(o)}this.setPixelRatio=o=>{this._pixelRatio!==o&&(this._pixelRatio=o,r(o))},th
6670 | `&&(s++,o=0),this.current.start=e,this.current.end=void 0;let[u,h]=mT(this.object,s,o),{AD:d,descender:f}=this.object,p=f+d*.5,{width:m,height:g,depth:y}=this.object.geometry.userData.parameters,x=typeof m=="string"?0:m,v=typeof g=="string"?0:g;this.caretMesh.scale.set(1,this.caretHeight,1),this.caretMesh.position.set(u-x*.5,h+p+v*.5,y),this.hideSelectionMesh(),this.showCaretMesh()}setSelection(e,r){if(this.object===void 0)return;let i=this.object.wrappedText;this.current.start=e,this.current.end=r;let s=[],o=[],a=bZ(i,e,r),{lineHeight:l,AD:c,descender:u}=this.object,h=u+c*.5-l*.5;for(let[x,v,S]of a)if(v!==S){let[w,A]=mT(this.object,x,v),[T,b]=mT(this.object,x,S);A+=h,b+=h,b+=l;let M=s.length/3;s.push(w,A,0),s.push(T,A,0),s.push(T,b,0),s.push(w,b,0),o.push(M+0,M+1,M+2),o.push(M+2,M+3,M+0)}let d=new Ce;d.setIndex(o),d.setAttribute("position",new Te(s,3));let{width:f,height:p,depth:m}=this.object.geometry.userData.parameters,g=typeof f=="string"?0:f,y=typeof p=="string"?0:p;this.selectionMesh.geometry.dispose()

SyntaxError: Unexpected token ','
      at /app/node_modules/@splinetool/runtime/build/runtime.js:6670:45013

Bun v1.2.2 (Linux arm64)
error: script "start" exited with code 1

Additional information

No response

@miguelvictor miguelvictor added bug Something isn't working needs triage labels Feb 3, 2025
@RiskyMH RiskyMH added bundler Something to do with the bundler and removed needs triage bundler Something to do with the bundler labels Feb 3, 2025
@RiskyMH
Copy link
Member

RiskyMH commented Feb 3, 2025

interesting, same error here #16941 (comment), except I don't think bun is building for your case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants