-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Closed
Description
问题描述
[问题描述:Uncaught TypeError: (0 , _router.createHistory) is not a function]
复现步骤
[复现问题的步骤]
- 项目taro版本为1.2.4,本地taro版本为1.2.22
- 重新删除node_modules和package-lock.json并npm i重新安装,使用的是taobao源
- 项目依赖安装完成后npm run dev:h5启动项目后提示错误
- Uncaught TypeError: (0 , _router.createHistory) is not a function
[或者可以直接贴源代码,能贴文字就不要截图]
//报错地方为.temp/app.js文件第19行
const _taroHistory = createHistory({
mode: "hash",
basename: "/",
customRoutes: {},
firstPagePath: "/pages/home/index"
});
期望行为
之前可以正常运行,只是更换了环境
报错信息
app.js?d0a8:19 Uncaught TypeError: (0 , _router.createHistory) is not a function
at eval (app.js?d0a8:19)
at Object../.temp/app.js (app.js:915)
at webpack_require (app.js:767)
at fn (app.js:130)
at Object.0 (app.js:1604)
at webpack_require (app.js:767)
at app.js:902
at app.js:905
系统信息
Taro v1.2 及以上版本已添加
taro info
命令,方便大家查看系统及依赖信息,运行该命令后将结果贴下面即可。
- 操作系统: [e.g. Mac 10.14.4]
- Taro 版本 [e.g. v.1.2.22]
- Node.js 版本 [e.g. v10.15.3]
- 报错平台 [h5]
leidenglai
Metadata
Metadata
Assignees
Labels
No labels