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

Sheets not rendering #4655

Open
jawadk116 opened this issue Feb 15, 2025 · 3 comments
Open

Sheets not rendering #4655

jawadk116 opened this issue Feb 15, 2025 · 3 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@jawadk116
Copy link

jawadk116 commented Feb 15, 2025

Hi,

I have integrated UniverJS Sheets into my Laravel application using the UNPKG CDN. It was functioning correctly until two days ago when it suddenly stopped working.

Upon inspecting the browser console, I encountered 27 errors related to the core library and other dependencies. I attempted to explicitly specify different versions in the CDN links (0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, and 0.6.0), but none resolved the issue.

To further investigate, I visited the official UniverJS documentation and copied the Example 1 code. I created a new HTML file on my local machine, pasted the code, and ran it in Google Chrome. However, the sheet failed to render, and the browser console displayed the same 27 errors.

Could you please assist me in resolving this issue?

Here is the link to Example 1: UniverJS Example 1

Below is the code I copied:

<head>
    <script src="https://unpkg.com/[email protected]/umd/react.production.min.js"></script>
    <script src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script>
    <script src="https://unpkg.com/rxjs/dist/bundles/rxjs.umd.min.js"></script>

    <script src="https://unpkg.com/@univerjs/protocol/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/core/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/telemetry/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/rpc/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/design/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/engine-render/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/engine-numfmt/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/engine-formula/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/drawing/lib/umd/index.js"></script>

    <script src="https://unpkg.com/@univerjs/ui/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/docs/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/docs-ui/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets-ui/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets-formula/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets-formula-ui/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets-numfmt/lib/umd/index.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets-numfmt-ui/lib/umd/index.js"></script>

    <script src="https://unpkg.com/@univerjs/engine-formula/lib/umd/facade.js"></script>
    <script src="https://unpkg.com/@univerjs/ui/lib/umd/facade.js"></script>
    <script src="https://unpkg.com/@univerjs/docs-ui/lib/umd/facade.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets/lib/umd/facade.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets-ui/lib/umd/facade.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets-formula/lib/umd/facade.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets-numfmt/lib/umd/facade.js"></script>

    <script src="https://unpkg.com/@univerjs/design/lib/umd/locale/en-US.js"></script>
    <script src="https://unpkg.com/@univerjs/ui/lib/umd/locale/en-US.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets/lib/umd/locale/zh-CN.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets-ui/lib/umd/locale/en-US.js"></script>
    <script src="https://unpkg.com/@univerjs/docs-ui/lib/umd/locale/en-US.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets-formula-ui/lib/umd/locale/en-US.js"></script>
    <script src="https://unpkg.com/@univerjs/sheets-numfmt-ui/lib/umd/locale/en-US.js"></script>

    <link rel="stylesheet" href="https://unpkg.com/@univerjs/design/lib/index.css" />
    <link rel="stylesheet" href="https://unpkg.com/@univerjs/ui/lib/index.css" />
    <link rel="stylesheet" href="https://unpkg.com/@univerjs/docs-ui/lib/index.css" />
    <link rel="stylesheet" href="https://unpkg.com/@univerjs/sheets-ui/lib/index.css" />
    <link rel="stylesheet" href="https://unpkg.com/@univerjs/sheets-formula-ui/lib/index.css" />
    <link rel="stylesheet" href="https://unpkg.com/@univerjs/sheets-numfmt-ui/lib/index.css" />

    <style>
        html,
        body,
        #root,
        #app {
            padding: 0;
            margin: 0;
            height: 100%;
        }
    </style>
</head>

<body>
    <div id="app"></div>

    <script>
        const { Univer, LocaleType, merge, UniverInstanceType, FUniver } = UniverCore
        const { defaultTheme } = UniverDesign
        const { UniverRenderEnginePlugin } = UniverEngineRender
        const { UniverFormulaEnginePlugin } = UniverEngineFormula
        const { UniverUIPlugin } = UniverUi
        const { UniverSheetsPlugin } = UniverSheets
        const { UniverSheetsUIPlugin } = UniverSheetsUi
        const { UniverDocsPlugin } = UniverDocs
        const { UniverDocsUIPlugin } = UniverDocsUi
        const { UniverSheetsFormulaPlugin } = UniverSheetsFormula
        const { UniverSheetsFormulaUIPlugin } = UniverSheetsFormulaUi
        const { UniverSheetsNumfmtPlugin } = UniverSheetsNumfmt
        const { UniverSheetsNumfmtUIPlugin } = UniverSheetsNumfmtUi

        const univer = new Univer({
            theme: defaultTheme,
            locale: LocaleType.EN_US,
            locales: {
                [LocaleType.EN_US]: merge(
                    {},
                    UniverDesignEnUS,
                    UniverUiEnUS,
                    UniverSheetsEnUS,
                    UniverSheetsUiEnUS,
                    UniverDocsUiEnUS,
                    UniverSheetsFormulaUiEnUS,
                    UniverSheetsNumfmtUiEnUS
                ),
            },
        });

        univer.registerPlugin(UniverRenderEnginePlugin);
        univer.registerPlugin(UniverFormulaEnginePlugin);

        univer.registerPlugin(UniverUIPlugin, {
            container: 'app',
        });

        univer.registerPlugin(UniverSheetsPlugin);
        univer.registerPlugin(UniverSheetsUIPlugin);

        univer.registerPlugin(UniverDocsPlugin);
        univer.registerPlugin(UniverDocsUIPlugin);

        univer.registerPlugin(UniverSheetsFormulaPlugin);
        univer.registerPlugin(UniverSheetsFormulaUIPlugin);
        univer.registerPlugin(UniverSheetsNumfmtPlugin);
        univer.registerPlugin(UniverSheetsNumfmtUIPlugin);

        univer.createUnit(UniverInstanceType.UNIVER_SHEET, {});

        const univerAPI = FUniver.newAPI(univer);
    </script>
</body>

Looking forward to your support.

Best regards,
Jawad Khan

@jikkai
Copy link
Member

jikkai commented Feb 16, 2025

The document needs to be updated @hexf00

@jikkai jikkai added question Further information is requested documentation Improvements or additions to documentation labels Feb 16, 2025
@jawadk116
Copy link
Author

jawadk116 commented Feb 16, 2025 via email

@univer-bot
Copy link

univer-bot bot commented Feb 16, 2025

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Ok thanks.

But why the previous versions doesn't work?

On Sun, 16 Feb 2025, 9:26 am 白熱, @.***> wrote:

The document needs to be updated @hexf00 https://github.com/hexf00


Reply to this email directly, view it on GitHub
#4655 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASZUMUWL3WQAEGXSINFK2ND2QAHOTAVCNFSM6AAAAABXG2ZSFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRRGIZTQNBTGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>
[image: jikkai]jikkai left a comment (#4655)
#4655 (comment)

The document needs to be updated @hexf00 https://github.com/hexf00


Reply to this email directly, view it on GitHub
#4655 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASZUMUWL3WQAEGXSINFK2ND2QAHOTAVCNFSM6AAAAABXG2ZSFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRRGIZTQNBTGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

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

No branches or pull requests

2 participants