Sp-dev-fx-webparts: WebPart not building successfully (updated title by narrowing down issue)

Created on 17 Jul 2020  路  6Comments  路  Source: pnp/sp-dev-fx-webparts

react-script-editor

@wobba

hello! This WebPart is exactly what I'm looking for!
I finally got the WebPart installed on our sharepoint online tenant.

However, the WebPart is showing this error (I've replaced our tenant name with ):

Something went wrong If the problem persists, contact the site administrator and give them the information in Technical Details. TECHNICAL DETAILS INNERERROR: Failed to load URL 'http://tenant.sharepoint.com/SiteAssets/Webparts/react-script-editor-propertycontrolstrings_en-us_92b9e969e3f7ed4b17e1c27dfc789861.js' for resource 'PropertyControlStrings' in component '3a328f0a-99c4-4b28-95ab-fe0847f657a3' (ScriptEditorWebPart). There was a network problem. CALLSTACK: Error at t [as constructor] (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_48456194923a0898165a11aa1c5b8908.js:1:865202) at new t (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_48456194923a0898165a11aa1c5b8908.js:1:1166457) at Function.e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_48456194923a0898165a11aa1c5b8908.js:1:1221623) at Function.e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_48456194923a0898165a11aa1c5b8908.js:1:1217668) at https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_48456194923a0898165a11aa1c5b8908.js:1:1209617

files are in the URL directory with correct name.

update--
in checking, even though I got the output file, when running 'gulp package-solution --ship' I get this error:

'Warning - [package-solution] The "cdnBasePath" in "config/write-manifests.json" has been changed from its default value ("") to "http://tenant.sharepoint.com/SiteAssets/Webparts", however the "includeClientSideAssets" setting in "config/package-solution.json" is "true" and will be ignored. If you meant to deploy your assets in your SPPKG to SharePoint, reset the value of "cdnBasePath" to "".
[00:08:19] Project pnp-script-editor version:1.0.0
[00:08:19] Build tools version:3.12.1
[00:08:19] Node version:v8.9.4
[00:08:19] Total duration:4.2 s
[00:08:19] Task warnings:1'
The build failed because a task wrote output to stderr.
Exiting with exit code: 1

Needs question

Most helpful comment

@petkir

thanks!

yes just tried it and it works! good to close! now to really play with it :)

All 6 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

Hi @adylim

thanks for reporting, I cloned the sample and made these steps:

cd samples\react-script-editor
npm install
gulp bundle --ship
gulp package-solution --ship

'Warning - [package-solution] The "cdnBasePath" in "config/write-manifests.json" has been changed from its default value ("") to "http://tenant.sharepoint.com/SiteAssets/Webparts", however the "includeClientSideAssets" setting in "config/package-solution.json" is "true" and will be ignored. If you meant to deploy your assets in your SPPKG to SharePoint, reset the value of "cdnBasePath" to "".

Your warning is not reproduced able for me, please check config/write-manifests.json it should look like this

{
    "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json",
    "cdnBasePath": "<!-- PATH TO CDN -->"
}

The other thing you can check the file config/package-solution.json file the property includeClientSideAssets should be set to true

Thanks for getting back to me @petkir!

in config/write-manifests.json: the <!-- PATH TO CDN --> is replaced with the url to my sharepoint (http://tenant.sharepoint.com/SiteAssets/Webparts) should I change it back to default?
I added it as I am deploying to sharepoint online..

the includeClientSideAssets property in config/package-solution.json is set to true

thanks!

Hi @adylim Please change it back to default, the warning should go away

@adylim let us know if that solved your issue so we can close this one.

Thanks @petkir!

@petkir

thanks!

yes just tried it and it works! good to close! now to really play with it :)

Was this page helpful?
0 / 5 - 0 ratings