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
constmoment=require('moment')// import moment from 'moment'// import * as moment from 'moment' 这种方式引入的时候不报错, 一旦使用还是报错
期望行为
这个模块应该可以被正常使用.
报错信息
WAService.js:1 Uncaught Error: can't find module : ../../../../node_modules/moment/moment.js
at WAService.js:1
at index.js:17
at require (WAService.js:1)
at :155:7
at HTMLScriptElement.scriptLoaded (appservice?t=1570089459960:3604)
at HTMLScriptElement.script.onload (appservice?t=1570089459960:3616)
系统信息
Taro v1.2 及以上版本已添加 taro info 命令,方便大家查看系统及依赖信息,运行该命令后将结果贴下面即可。
问题描述
当我引入moment这个库的时候报错, 错误提示
WAService.js:1 Uncaught Error: can't find module : ../../../../node_modules/moment/moment.
复现步骤
期望行为
这个模块应该可以被正常使用.
报错信息
WAService.js:1 Uncaught Error: can't find module : ../../../../node_modules/moment/moment.js
at WAService.js:1
at index.js:17
at require (WAService.js:1)
at :155:7
at HTMLScriptElement.scriptLoaded (appservice?t=1570089459960:3604)
at HTMLScriptElement.script.onload (appservice?t=1570089459960:3616)
系统信息
👽 Taro v1.3.19
Taro CLI 1.3.19 environment info:
System:
OS: macOS 10.14.6
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.7.0 - ~/.nvm/versions/node/v11.7.0/bin/node
Yarn: 1.13.0 - ~/.nvm/versions/node/v11.7.0/bin/yarn
npm: 6.11.3 - ~/.nvm/versions/node/v11.7.0/bin/npm
报错程序 微信小程序
The text was updated successfully, but these errors were encountered: