Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

新建项目启动白屏,process.env.NODE_ENV找不到 #1686

Closed
qzcsgs opened this issue Nov 1, 2018 · 5 comments
Closed

新建项目启动白屏,process.env.NODE_ENV找不到 #1686

qzcsgs opened this issue Nov 1, 2018 · 5 comments

Comments

@qzcsgs
Copy link

qzcsgs commented Nov 1, 2018

运行在 iPhone X 12.0 ,中启动白屏,经过排查发现是 bundle/index.js 中的process.env.NODE_ENV找不到,手动将 bundlejs 中的全部 process.env.NODE_ENV 替换为字符串就正常了,如何解决?

macOS v10.13.4
weex v1.3.11
weexpack : v1.2.7
weex-builder : v0.4.0
weex-previewer : v1.5.1

按照官网的教程, 依次执行
weex create awesome-app
cd awesome-app
npm install
weex platform add ios
weex run ios

@allen2437
Copy link

@qzcsgs 将podfile文件中WeexSDK版本改成pod 'WeexSDK','~> 0.18.0.3'应该就可以

@qzcsgs
Copy link
Author

qzcsgs commented Nov 2, 2018

@qzcsgs 将podfile文件中WeexSDK版本改成pod 'WeexSDK','~> 0.18.0.3'应该就可以

非常感谢,出问题的版本为0.19.0,修改为0.18.0.3就解决了。再次感谢。

@Hanks10100
Copy link
Contributor

Same with #1685

@foyel
Copy link

foyel commented Nov 8, 2018

@Hanks10100 现在IOS的Weex Playground被升级了不能使用,官方除了删打包文件里的process,有没有什么解决方法啊

erha19 added a commit to weex-templates/webpack that referenced this issue Nov 13, 2018
@erha19
Copy link
Contributor

erha19 commented Nov 13, 2018

@foyel @qzcsgs The official webpack configuration has been updated, and the process .env.NODE_ENV variable will be automatically replaced. You can re-run the weex create command to create a template and put configs folder (which has some webpack config files) into your old project to replace the old configuration.

commit: weex-templates/webpack@f7c7d04

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants