I am trying to deploy my spfx webpart (not for testing). I am using
gulp clean --ship
gulp build --ship
gulp bundle --ship
gulp package-solution --ship
but getting that error
<span class="b_a_7caff1a1">[SPLoaderError.loadComponentError]:<br>Failed to load component "d1587168-2126-44f1-bc7d-cfa4cc5108ed" (appWebPart). Original error: Failed to load URL 'https://localhost:4321/lib/webparts/app/loc/en-us.js' for resource 'appWebPartStrings' in component 'd1587168-2126-44f1-bc7d-cfa4cc5108ed' (appWebPart). There was a network problem. Make sure that you are running 'gulp serve' and you have run 'gulp trust-dev-cert'.<br><br>INNERERROR:<br>Failed to load URL 'https://localhost:4321/lib/webparts/app/loc/en-us.js' for resource 'appWebPartStrings' in component 'd1587168-2126-44f1-bc7d-cfa4cc5108ed' (appWebPart). There was a network problem. Make sure that you are running 'gulp serve' and you have run 'gulp trust-dev-cert'.<br>CALLSTACK:<br>Error<br> at t [as constructor] (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_0a1c05f5e3bd0bdb1beb2cb00167ccfa.js:1:956938)<br> at new t (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_0a1c05f5e3bd0bdb1beb2cb00167ccfa.js:1:1102532)<br> at Function.e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_0a1c05f5e3bd0bdb1beb2cb00167ccfa.js:1:1157847)<br> at Function.e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_0a1c05f5e3bd0bdb1beb2cb00167ccfa.js:1:1153892)<br> at https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_0a1c05f5e3bd0bdb1beb2cb00167ccfa.js:1:1145841</span>
It works fine when I test on workbench though. How can I fix this?
Thanks
