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'