1、场景:配置tabbar图片
新手小白以为tabbar可以使用组件icon,就引用了taro-ui 的icon组件
2、原因:是在app.config.js文件中 引用了UI组件但未使用导致的
image.png3、解决方案:删除呗,tabbar不能使用组件
4、结果: 编译成功
下面是报错信息
@JRMC20E1MD6P ~/Desktop/minipro/vshow master npm run dev:weapp
> vshow@1.0.0 build:weapp /Users//Desktop/minipro/vshow
> NODE_ENV=production taro build --type weapp "--watch"
👽 Taro v3.0.7
生成 工具配置 /Users//Desktop/minipro/vshow/dist/project.config.json
Unexpected token 'export'
Unexpected token 'export'
(node:30246) UnhandledPromiseRejectionWarning: /Users//Desktop/minipro/vshow/node_modules/_@tarojs_runtime@3.0.7@@tarojs/runtime/dist/runtime.esm.js:3625
export { Current, CurrentReconciler, Events, FormElement, Style, TaroElement, TaroEvent, TaroNode, TaroRootElement, TaroText, caf as cancelAnimationFrame, connectReactPage, connectVuePage, createComponentConfig, createDocument, createEvent, createPageConfig, createReactApp, createRecursiveComponentConfig, createVue3App, createVueApp, document$1 as document, eventCenter, getCurrentInstance, hydrate, injectPageInstance, navigator, nextTick, now, options, raf as requestAnimationFrame, stringify, useAddToFavorites, useDidHide, useDidShow, useOptionMenuClick, usePageScroll, usePullDownRefresh, usePullIntercept, useReachBottom, useReady, useResize, useRouter, useScope, useShareAppMessage, useShareTimeline, useTabItemTap, useTitleClick, window$1 as window };
^^^^^^
SyntaxError: Unexpected token 'export'
at compileFunction (<anonymous>)
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
at Module._compile (internal/modules/cjs/loader.js:1101:27)
at Module._compile (/Users//Desktop/minipro/vshow/node_modules/_pirates@4.0.1@pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Object.newLoader [as .js] (/Users//Desktop/minipro/vshow/node_modules/_pirates@4.0.1@pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users//Desktop/minipro/vshow/node_modules/_@tarojs_api@3.0.7@@tarojs/api/dist/index.js:5:15)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Module._compile (/Users//Desktop/minipro/vshow/node_modules/_pirates@4.0.1@pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Object.newLoader [as .js] (/Users//Desktop/minipro/vshow/node_modules/_pirates@4.0.1@pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:985:32)
(node:30246) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:30246) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@JRMC20E1MD6P ~/Desktop/minipro/vshow master
网友评论