Elius94 / react-photo-sphere-viewer

Photosphere Viewer for React.JS
MIT License
65 stars 21 forks source link

import ReactPhotoSphereViewer causing syntax issue #13

Closed makethisbuildthat closed 10 months ago

makethisbuildthat commented 1 year ago

I added this line in my code:

import { ReactPhotoSphereViewer } from "react-photo-sphere-viewer";

and when i run my react app i got the following error message:

`import React, { forwardRef, createRef, useState, useEffect, useImperativeHandle } from 'react'; ^^^^^

SyntaxError: Unexpected identifier at Module._compile (internal/modules/cjs/loader.js:723:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) `

Using React version 16.9. Server-side rendering.

Thanks

Elius94 commented 1 year ago

Hello! Thanks for your issue, I hope that we can solve this as soon as possible. Can you replicate your issue in a codesandbox demo? I did not test this feature in Resct Server side Rendering...

makethisbuildthat commented 1 year ago

hi @Elius94 I'm not able to replicate this issue in codesandbox given that it's very difficult to mimic the universal rendering (both client and server side rendering). I know this is a server-side rendering issue. The question right now is do you want to provide server-side rendering for react-photo-sphere-viewer?

mkubdev commented 1 year ago

hi @Elius94 I'm not able to replicate this issue in codesandbox given that it's very difficult to mimic the universal rendering (both client and server side rendering). I know this is a server-side rendering issue. The question right now is do you want to provide server-side rendering for react-photo-sphere-viewer?

Can you provide a reproduction folder with your implementation or your testing steps?

Elius94 commented 1 year ago

I am not an expert in server-side rendering in React. I am also not sure if such a library would work well in this way either... Basically, the library on which this wrapper is based is pure JS code that runs in the browser. But I could be wrong as I am not used to using these rendering methods.

makethisbuildthat commented 1 year ago

@mkubdev @Elius94 the boilerplate that i'm using is the one below. It is universal rendering: https://github.com/reactGo/reactGo

Maybe some of the dependencies are too old? But i can't figure out what i need to change/update in order for react-photo-sphere-viewer to run...

Elius94 commented 11 months ago

Hi! have you figured it out? There's a new release of yesterday with an impactful change, maybe it can solve also your problem

makethisbuildthat commented 10 months ago

no i decided to use something else