You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
错误 页面编译 页面/Users/myName/Documents/Tmp/taro-demo/src/pages/index/index编译失败!
TypeError: Property quasi of TaggedTemplateExpression expected node to be of a type ["TemplateLiteral"] but instead got "StringLiteral"
at Object.validate (/Users/myName/.config/yarn/global/node_modules/babel-types/lib/definitions/index.js:109:13)
at Object.validate (/Users/myName/.config/yarn/global/node_modules/babel-types/lib/index.js:505:9)
at NodePath._replaceWith (/Users/myName/.config/yarn/global/node_modules/babel-traverse/lib/path/replacement.js:176:7)
at NodePath.replaceWith (/Users/myName/.config/yarn/global/node_modules/babel-traverse/lib/path/replacement.js:160:8)
at TemplateLiteral (/Users/myName/.config/yarn/global/node_modules/@tarojs/transformer-wx/lib/src/index.js:198:18)
at NodePath._call (/Users/myName/.config/yarn/global/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/Users/myName/.config/yarn/global/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/Users/myName/.config/yarn/global/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/Users/myName/.config/yarn/global/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitSingle (/Users/myName/.config/yarn/global/node_modules/babel-traverse/lib/context.js:108:19)
或者:
错误 页面编译 页面/Users/myName/Documents/Tmp/taro-demo/src/pages/index/index编译失败!
TypeError: Cannot read property 'wxss' of undefined
at buildDepComponentsResult.map.item (/Users/myName/.config/yarn/global/node_modules/@tarojs/cli/src/weapp.js:1424:23)
at Array.map (<anonymous>)
at getDepStyleList (/Users/myName/.config/yarn/global/node_modules/@tarojs/cli/src/weapp.js:1423:44)
at buildSinglePage (/Users/myName/.config/yarn/global/node_modules/@tarojs/cli/src/weapp.js:1265:28)
系统信息
操作系统: macOS 10.13.4
Taro 版本: v1.1.0-beta.10
Node.js 版本: v10.8.0
报错平台: weapp
补充信息
无
The text was updated successfully, but these errors were encountered:
问题描述
从 graphql-tag 导入 gql 函数导致编译失败。
复现步骤
安装依赖:
yarn add graphql graphql-tag
在
/src/pages/index/index.js
添加:执行:
yarn run dev:weapp
得到错误信息。
期望行为
编译成功,无报错
报错信息
或者:
系统信息
补充信息
无
The text was updated successfully, but these errors were encountered: