问题
After following the migration path from 4.x.x to 5.0.0, I've came to the issue that when runnig the migrate application (with ojet serve) I get some errors in the browser console, related to the libraries: - ojcorebundle.js - ojcommoncomponentsbundle.js - oj3rdpartybundle.js
Checking the network i see that those are not found. I've checked also the generated libs folder and the node_modules, @oracle folder and no luck.
回答1:
It seems that those files are not included in v5.0.0. There's a workaround. You can add those files manually to the associated node_module folder. But you need to get those files first:
- Go to JET Cookbook.
- Open dev tools, then the Network panel.
- Reload page if there are no files listed.
- Filter by "JS" since there are lots of files.
- Find and download the mentioned three files.
- Add them to \node_modules\@oracle\oraclejet\dist\js\libs\oj\debug
- Run
$ ojet serve
回答2:
This appears to be an issue with the migration process Ciprian. The code should not be trying to load those bundle libraries when it's pulling from local files. If you open the path_mapping.json file, you can change the "use" parameter to the value of "cdn" instead of the default of "local". Rerun the ojet build/serve commands and things should work properly.
I'm looking into why the bundles are being referenced in local mode right now and hope to have a fix for that shortly.
Sorry for the troubles.
来源:https://stackoverflow.com/questions/49895656/upgrade-to-ojet-5-0-0-issue-ojcorebundle-js-not-found