alibaba / ice

🚀 ice.js: The Progressive App Framework Based On React(基于 React 的渐进式应用框架)
https://ice.work
MIT License
17.84k stars 2.09k forks source link

小程序模板 执行yarn start 出现onGetWebpackConfig is not a function #3527

Closed ruhignieh closed 4 years ago

ruhignieh commented 4 years ago

小程序模板 执行yarn start 出现onGetWebpackConfig is not a function

使用官方模板小程序模板,yarn && yarn start

onGetWebpackConfig is not a function

ERR! CONFIG Failed to get config.
ERR! onGetWebpackConfig is not a function
TypeError: onGetWebpackConfig is not a function
    at Object.module.exports [as setConfig] (C:\Users\nnie.VISTAPRINTUS\MiniProjects\ice-ts-temp\node_modules\miniapp-runtime-config\src\setConfig.js:92:3)
    at C:\Users\nnie.VISTAPRINTUS\MiniProjects\ice-ts-temp\node_modules\build-plugin-miniapp\lib\index.js:30:31
    at Context.runWebpackFunctions (C:\Users\nnie.VISTAPRINTUS\MiniProjects\ice-ts-temp\node_modules\@alib\build-scripts\lib\core\Context.js:357:27)
    at async Context.setUp (C:\Users\nnie.VISTAPRINTUS\MiniProjects\ice-ts-temp\node_modules\@alib\build-scripts\lib\core\Context.js:364:13)
    at async module.exports (C:\Users\nnie.VISTAPRINTUS\MiniProjects\ice-ts-temp\node_modules\@alib\build-scripts\lib\commands\start.js:23:21)
    at async Object.module.exports [as childProcessStart] (C:\Users\nnie.VISTAPRINTUS\MiniProjects\ice-ts-temp\node_modules\create-cli-utils\lib\child-process-start.js:39:23)
    at async C:\Users\nnie.VISTAPRINTUS\MiniProjects\ice-ts-temp\node_modules\ice.js\bin\child-process-start.js:6:3
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
* `src/app.(ts|js)`:

import { runApp } from 'ice';

runApp({ app: { onShow() { console.log('app show...'); }, onHide() { console.log('app hide...'); } } });



**What is the expected behavior?**
ruhignieh commented 4 years ago

image 好像是这块的问题

SoloJiang commented 4 years ago

下周的版本里会修复这个问题

SoloJiang commented 4 years ago

https://github.com/alibaba/ice/pull/3528

chenbin92 commented 4 years ago

@ruhignieh 已发布 ice.js@1.9.1 版本修复

honwhy commented 4 years ago

npm install --registry https://registry.npm.taobao.org && npm run build 获取不到 No matching version found for ice.js@^1.9.1