Failed to parse source map from

Hello,

I create forge project:

forget create ā†’ xxx-> JIRA global page

after create project I build project and works well:

npm run build

> jira-global-page-custom-ui-static@0.1.24 build
> react-scripts build

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  51.61 kB  build/static/js/main.7d263b53.js
  1.7 kB    build/static/css/main.d1042abb.css

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  https://cra.link/deployment```

Next I add button component



npm install @atlaskit/button

In the project App.js file add button.


import React, { useEffect, useState } from 'react';
import { invoke } from '@forge/bridge';
import Button from '@atlaskit/button';

function App() {
    const [data, setData] = useState(null);

    useEffect(() => {
        invoke('getText', { example: 'my-invoke-variable' }).then(setData);
    }, []);

    return (
        <div>
            {data ? data : 'Loading...'}
            <Button>Default button</Button>
        </div>
    );
}

export default App;

And Run build

npm run build

> jira-global-page-custom-ui-static@0.1.24 build
> react-scripts build

Creating an optimized production build...
Compiled with warnings.

Failed to parse source map from '/Volumes/Macintosh HD - Data/sourse/jira-cloud/tests/forge2/static/hello-world/node_modules/@atlaskit/analytics-next-stable-react-context/src/context.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Macintosh HD - Data/sourse/jira-cloud/tests/forge2/static/hello-world/node_modules/@atlaskit/analytics-next-stable-react-context/src/context.ts'

Failed to parse source map from '/Volumes/Macintosh HD - Data/sourse/jira-cloud/tests/forge2/static/hello-world/node_modules/@atlaskit/analytics-next-stable-react-context/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Macintosh HD - Data/sourse/jira-cloud/tests/forge2/static/hello-world/node_modules/@atlaskit/analytics-next-stable-react-context/src/index.ts'

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  65.4 kB (+13.79 kB)  build/static/js/main.0f68e628.js
  1.7 kB               build/static/css/main.d1042abb.css

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  https://cra.link/deployment```

There is problem and how to fix this ?

Failed to parse source map from '/Volumes/Macintosh HD - Data/sourse/jira-cloud/tests/forge2/static/hello-world/node_modules/@atlaskit/analytics-next-stable-react-context/src/context.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Macintosh HD - Data/sourse/jira-cloud/tests/forge2/static/hello-world/node_modules/@atlaskit/analytics-next-stable-react-context/src/context.ts'

Failed to parse source map from '/Volumes/Macintosh HD - Data/sourse/jira-cloud/tests/forge2/static/hello-world/node_modules/@atlaskit/analytics-next-stable-react-context/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Macintosh HD - Data/sourse/jira-cloud/tests/forge2/static/hello-world/node_modules/@atlaskit/analytics-next-stable-react-context/src/index.ts'


Hi @AM1 ,
did you find a solution / workaround in the meantime?

Iā€™m running into the same problem using @atlaskit/toolkit.
So why does Atlassian not deliver the necessary files - or is there a better solution than using atlaskit??
It would be great to get an answer from Atlassian colleagues.

At least I found a workaround that seams to work:

  • Look for the file node_modules\react-scripts\config\webpack.config.js
  • add the option ignoreWarnings after the resolve: {} statement
resolve: {...
},
ignoreWarnings: [/Failed to parse source map/],

Anyone have a solution or more information on this?

1 Like

no there is no solution