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

Error after upgrading to SPFx 1.20.0 #149

Closed
kbeeveer46 opened this issue Sep 27, 2024 · 7 comments
Closed

Error after upgrading to SPFx 1.20.0 #149

kbeeveer46 opened this issue Sep 27, 2024 · 7 comments

Comments

@kbeeveer46
Copy link

I ran my project with gulp serve and did not see these errors so I assume it's fast serve related? Just wanted to let you know there may need to be updates to it for the new SPFx version.

The errors below are referring to is this line on every web part file

import { Version } from '@microsoft/sp-core-library';

Which is needed for this code in the file

protected get dataVersion(): Version
    {
        return Version.parse('1.0');
    }

Errors:

Build target: DEBUG
[11:55:25] Using gulpfile C:\RespositoriesGit\CP\clientportalsharepoint\gulpfile.js
[11:55:25] Starting 'bundle'...
[11:55:25] Starting gulp
[11:55:25] Starting subtask 'pre-copy'...
[11:55:25] Finished subtask 'pre-copy' after 62 ms
[11:55:25] Starting subtask 'copy-static-assets'...
[11:55:25] Starting subtask 'sass'...
[11:55:26] Finished subtask 'sass' after 888 ms
[11:55:26] Starting subtask 'lint'...
[11:55:26] [lint] eslint version: 8.57.0
[11:55:26] Starting subtask 'tsc'...
[11:55:26] [tsc] typescript version: 4.7.4
[11:55:26] Finished subtask 'copy-static-assets' after 1.31 s
[11:55:42] Finished subtask 'lint' after 16 s
[11:55:51] Finished subtask 'tsc' after 25 s
[11:55:51] Starting subtask 'save-webpack-config'...
[11:55:51] Finished subtask 'save-webpack-config' after 970 μs
[11:55:51] Starting subtask 'post-copy'...
[11:55:51] Finished subtask 'post-copy' after 274 μs
[11:55:51] Starting subtask 'configure-webpack'...
[11:55:52] Finished subtask 'configure-webpack' after 552 ms
[11:55:52] Starting subtask 'webpack'...
[11:56:20] Error - [webpack] 'dist':
Did not find linked external "@microsoft/sp-core-library" for bundle "admin-manage-permissions-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "common-custom-reports-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "common-document-library-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "common-iframe-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "home-about-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "home-banner-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "home-documents-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "home-links-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "home-marketing-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "home-videos-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "home-page-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "pt-dashboard-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "pt-reports-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "pt-search-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "site-create-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "site-request-site-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "site-request-site-pending-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "site-select-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "tt-audit-tracker-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "tt-audit-and-recovery-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "tt-tax-rate-and-state-information-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "ttc-dashboard-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "ttc-carry-forward-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "ttc-compliance-summary-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "ttc-documents-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "ttc-filing-calendar-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "ttc-locations-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "ttc-notices-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "ttc-on-demand-reports-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "ttc-prepayment-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "ttc-rate-validation-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "ttc-tax-returns-web-part".

[11:56:20] Finished subtask 'webpack' after 28 s
[11:56:20] Finished 'bundle' after 55 s
@s-KaiNet
Copy link
Owner

If you run just gulp bundle, do you see any errors?

@kbeeveer46
Copy link
Author

No errors with gulp bundle

@s-KaiNet
Copy link
Owner

but the errors you posted

[11:55:52] Starting subtask 'webpack'...
[11:56:20] Error - [webpack] 'dist':
Did not find linked external "@microsoft/sp-core-library" for bundle "admin-manage-permissions-web-part".
Did not find linked external "@microsoft/sp-core-library" for bundle "common-custom-reports-web-part".

Basically the errors from gulp bundle output.

@s-KaiNet
Copy link
Owner

wait, which version of spfx-fast-serve do you use? I haven't relelased 1.20 yet.

@kbeeveer46
Copy link
Author

Latest version. So maybe this is expected. Just to confirm, should we always wait for the corresponding fast serve version to be released before we upgrade SPFx?

@s-KaiNet
Copy link
Owner

Yes, it's documented here, so you cannot run spfx-fast-serve-helpers@1.19 against a project based on SPFx 1.20. spfx-fast-serve-helpers@1.20 is not yet released, will do it on weekend.

@kbeeveer46
Copy link
Author

Thanks! Will give it a try when it's released.

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

No branches or pull requests

2 participants