problem solved: create a project using weexpack create project name
, do not use weex create project name
in the official document!
create a project using ide/set-up-env.html" rel=" nofollow noreferrer "> weex , introduce weex-ui, to copy weex-ui "s demo code , and report an error in the browser console after running:
[Vue warn]: Property or method "_px2rem" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html-sharpDeclaring-Reactive-Properties.
found in
---> <WxcButton> at /Users/xuyuning/Sites/myApp/node_modules/weex-ui/packages/wxc-button/index.vue
<HelloWorld> at /Users/xuyuning/Sites/myApp/src/components/HelloWorld.vue
<Root>
looks like the _ px2rem
package call failed, while this WxcButton
is in node_modules/
and does not have permission to modify.
are there any students with similar problems? Solve!