History: ./node_modules/history/esm/history.js Module not found: Can't resolve '@babel/runtime/helpers/esm/extends'

Created on 16 Mar 2019  ·  24Comments  ·  Source: ReactTraining/history

When l use version 4.9.0

./node_modules/history/esm/history.js
Module not found: Can't resolve '@babel/runtime/helpers/esm/extends' in '/Users/zry/Documents/ZhongDaoProject/hxtrip-backstage-operator-web/node_modules/history/esm'

Most helpful comment

@xiaobc1234 "roadhog": "^2.5.0-beta.4"

多谢,换成2.5.0-beta.4 就可以了

All 24 comments

我也遇到了同样的问题

use 4.7.2,maybe can resolve your problem, in my project,substitute 4.9.0 to4.7.2 , my problem resolve

@Furholeder I know how to solve the problem, but in my project I can find the module according to the directory, just report this error.

@wanghang2017 遇到同样的问题,请问解决了吗?

遇到同样的问题,请问有人解决了吗?

遇到同样的问题,请问有人解决了吗?

@tang-yue 我这边用的dva,换了raodhog版本号就解决了

遇到同样的问题,请问有人解决了吗?

@tang-yue 我这边用的dva,换了raodhog版本号就解决了

但是更新版本号之后,你有遇到下面这个问题吗?

Module build failed: SyntaxError: Decorators are not officially supported yet in 6.x pending a proposal update.
However, if you need to use them you can install the legacy decorators transform with:

npm install babel-plugin-transform-decorators-legacy --save-dev

and add the following line to your .babelrc file:

{
  "plugins": ["transform-decorators-legacy"]
}

我尝试了很多方式在webpackrc.js 里用extraBabelPlugins引用这个插件,但是都没有生效。

@tang-yue step1:npm install babel-plugin-transform-decorators-legacy --save-dev
step:2: add the following line to your .babelrc file:

{
  "plugins": ["transform-decorators-legacy"]
}

@tang-yue 默认就支持装饰器吧,你咋还配装饰器呢

遇到同样的问题,请问有人解决了吗?

@tang-yue 我这边用的dva,换了raodhog版本号就解决了

但是更新版本号之后,你有遇到下面这个问题吗?

Module build failed: SyntaxError: Decorators are not officially supported yet in 6.x pending a proposal update.
However, if you need to use them you can install the legacy decorators transform with:

npm install babel-plugin-transform-decorators-legacy --save-dev

and add the following line to your .babelrc file:

{
  "plugins": ["transform-decorators-legacy"]
}

我尝试了很多方式在webpackrc.js 里用extraBabelPlugins引用这个插件,但是都没有生效。

@wanghang2017 这个问题我解决了,更改版本号的谢谢啦🎉🎉。

@tang-yue 你知道这个报错的原因了吗,我还不知道,在npm上看 3天前作者重新发布了一版,估计就是那时候出现这问题的

遇到同样的问题,请问有人解决了吗?

@tang-yue 我这边用的dva,换了raodhog版本号就解决了

但是更新版本号之后,你有遇到下面这个问题吗?

Module build failed: SyntaxError: Decorators are not officially supported yet in 6.x pending a proposal update.
However, if you need to use them you can install the legacy decorators transform with:

npm install babel-plugin-transform-decorators-legacy --save-dev

and add the following line to your .babelrc file:

{
  "plugins": ["transform-decorators-legacy"]
}

我尝试了很多方式在webpackrc.js 里用extraBabelPlugins引用这个插件,但是都没有生效。

@wanghang2017 这个问题我解决了,更改版本号的谢谢啦🎉🎉。

更改roadhog版本号到多少?

遇到同样的问题,请问有人解决了吗?

@tang-yue 我这边用的dva,换了raodhog版本号就解决了

这个不是roadhog的问题吧,是dva引用了history ^4.6.3的版本,自动升级到了4.9.0。这个要dva升级,还是history4.9.0版本有问题

@xiaobc1234 "roadhog": "^2.5.0-beta.4"

@xiaobc1234 history4.9.0版本没问题,可能是babel7.0.0的问题

@xiaobc1234 "roadhog": "^2.5.0-beta.4"

多谢,换成2.5.0-beta.4 就可以了

不容易啊,怎么排查出来的~~~楼上的大神

@xiaobc1234 "roadhog": "^2.5.0-beta.4"

有效,666

@xiaobc1234 请问这个是在哪个文件下修改的~

@zcx616488494 你当前项目的package.json

@wanghang2017 谢谢,那这地方修改之后就直接启动就可以了嘛~

@zcx616488494 我不知道你的启动是什么意思,但是我建议你先删除你的node_modules然后重新安装依赖,另外,我感觉你问的问题有些不太专业,还有的问题的话请自行百度

@xiaobc1234 "roadhog": "^2.5.0-beta.4"

多谢,换成2.5.0-beta.4 就可以了

赞,解决了我的问题

把import _extends from @babel/runtime/helpers/esm/extends' 修改改为:import _extends from '../node_modules/@babel/runtime/helpers/esm/extends'可以解决

Was this page helpful?
0 / 5 - 0 ratings

Related issues

govizlora picture govizlora  ·  5Comments

dehghani-mehdi picture dehghani-mehdi  ·  6Comments

kirill-konshin picture kirill-konshin  ·  7Comments

mereskin-zz picture mereskin-zz  ·  4Comments

mgustin12 picture mgustin12  ·  5Comments