https://docs.cocos.com/creator/manual/zh/editor/extension/scene-script.html
Can not load engine module: cc. Valid engine modules are: cc/editor/macro,cc/editor/populate-internal-constants
给个 demo 看看,不是在场景脚本当中执行的吧?
嗯嗯,我只复制代码其他的没改,现在可以了,谢谢
你好 这个怎么解决的? 按照代码写会报错
[Window] Cannot find module ‘/Applications/Cocos/Creator/3.8.2/CocosCreator.app/Contents/Resources/app.asar/node_modules/cc/index.js’. Please verify that the package.json has a valid “main” entry