Open Yunxi-awa opened 4 months ago
me too
The following error occurs when you add an extension directly with cocos
The plug-in main process failed to load. Error: Cannot find module 'D:\cocosWorkspaces\HelloWorld\extensions\live2d_cubismsdk_cocoscreator\dist\main.js' Require stack:
at Module._resolveFilename (internal/modules/cjs/loader.js:887:15) at n._resolveFilename (electron/js2c/browser_init.js:257:921) at Function.Module._resolveFilename (D:\cocosCreator\Creator\3.8.3\resources\app.asar\node_modules\@editor\creator\index.js:8:24) at Function._resolveFilename (D:\cocosCreator\Creator\3.8.3\resources\app.asar\node_modules\cc\preload.ts:109:46) at Module._load (internal/modules/cjs/loader.js:732:27) at Function.f._load (electron/js2c/asar_bundle.js:5:12913) at Function._load (D:\cocosCreator\Creator\3.8.3\resources\app.asar\node_modules\cc\preload.ts:127:35) at Module.require (internal/modules/cjs/loader.js:959:19) at o (D:\cocosCreator\Creator\3.8.3\resources\app.asar\node_modules\@editor\creator\dist\require.js:1:2742) at Package._init (D:\cocosCreator\Creator\3.8.3\resources\app.asar\node_modules\@editor\package\dist\browser\package.ccc:1:2523)
Here is the error output.
I completely followed the instructions in the README file to import the SDK, but the build did not go smoothly.
I found that it was because there were two missing underscores in the static/sets/Framework/ComponentExtensionMethods.ts file.
After adding the underline, the build no longer had any problems. I think there must have been an oversight in the naming, because "__private._types_globals_Constructor" should be the correct version🤔