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

[Support]: WARNING in ./node_modules/react-photo-sphere-viewer/dist/index.js #67

Open
rsrg-zwiama opened this issue Nov 27, 2024 · 8 comments
Labels
question Further information is requested

Comments

@rsrg-zwiama
Copy link

What are you trying to do?

I try to use ReactPhotoSphereViewer in my react project. So i tried to implement the ReactPhotoSphereViewer as you described in the readme file, section usage, using React. When I build with yarn, I get the warning, which I copied to the Logs.
So what am I doing wrong? Any Ideas?
Thanks!

Code

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


export function customAttributeCalculator(layer, feature) {
    if (<conditions here>) {
        .....
        const fotoPath = feature.properties.Panorama.replace("attachment://", "");
        return [(
            <tr key="custom-attr">
                <td className="identify-attr-value">
                    <div className="Pano">
                        <ReactPhotoSphereViewer
                            height={"50vh"}
                            src={fotoPath}
                            width={"100%"}
                        />
                    </div>
                </td>
            </tr>
        )];
    }
    return [];
}

Sandbox Link

No response

Library Version

6.0.0

What operating system are you using?

Windows

What browser are you using?

Firefox

Logs

Compiled with problems:
WARNING in ./node_modules/react-photo-sphere-viewer/dist/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\Users\xxx\node_modules\react-photo-sphere-viewer\src\index.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\xxx\node_modules\react-photo-sphere-viewer\src\index.tsx'

@rsrg-zwiama rsrg-zwiama added the question Further information is requested label Nov 27, 2024
@MiriamMcNamara
Copy link

MiriamMcNamara commented Nov 27, 2024

This is happening to me as well. Using MacOS, chrome browser.

@Elius94
Copy link
Owner

Elius94 commented Nov 27, 2024

Hi :)
Thanks for the issue!
Tomorrow I'm gonna test this trouble and hopefully fix it 👍🏼
Thank you

@Elius94
Copy link
Owner

Elius94 commented Nov 28, 2024

Hey! I can't replicate the issue, can you help me?

@Elius94
Copy link
Owner

Elius94 commented Nov 28, 2024

Is the trouble only related to yarn? Npm works?
I've tried Yarn now and in my case it seems work

@rsrg-zwiama
Copy link
Author

Hey, tanks for looking into this. Yes I use yarn to build the app
When adding the library and run yarn install, there is a folder /node_modules/react-photo-sphere-viewer. This contains a folder /dist and /node_modules. There is no /src or index.tsx file at all.

@Elius94
Copy link
Owner

Elius94 commented Dec 2, 2024

Are you building with Create React App?

@MiriamMcNamara
Copy link

MiriamMcNamara commented Dec 2, 2024 via email

@rsrg-zwiama
Copy link
Author

I build with webpack --mode production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants