Elius94 / react-photo-sphere-viewer

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

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

Open rsrg-zwiama opened 3 days ago

rsrg-zwiama commented 3 days ago

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'

MiriamMcNamara commented 3 days ago

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

Elius94 commented 3 days ago

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

Elius94 commented 2 days ago

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

Elius94 commented 2 days ago

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