Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zry754331875 opened this issue Mar 16, 2019 · 24 comments

Comments

@zry754331875
Copy link

commented Mar 16, 2019

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'
@Furholeder

This comment has been minimized.

Copy link

commented Mar 17, 2019

我也遇到了同样的问题

@Furholeder

This comment has been minimized.

Copy link

commented Mar 17, 2019

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

@zry754331875

This comment has been minimized.

Copy link
Author

commented Mar 17, 2019

@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.

@tang-yue

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

@tang-yue

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

@wanghang2017

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

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

@tang-yue

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

@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引用这个插件,但是都没有生效。

@zry754331875

This comment has been minimized.

Copy link
Author

commented Mar 19, 2019

@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"]
}
@wanghang2017

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

@tang-yue

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

@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 这个问题我解决了,更改版本号的谢谢啦🎉🎉

@wanghang2017

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

@xiaobc1234

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

@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版本号到多少?

@xiaobc1234

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

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

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

@wanghang2017

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

@wanghang2017

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

@xiaobc1234

This comment has been minimized.

Copy link

commented Mar 19, 2019

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

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

@Super-Ps

This comment has been minimized.

Copy link

commented Mar 20, 2019

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

@AdamFu

This comment has been minimized.

Copy link

commented Mar 20, 2019

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

有效,666

@zcx616488494

This comment has been minimized.

Copy link

commented Mar 21, 2019

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

@wanghang2017

This comment has been minimized.

Copy link

commented Mar 21, 2019

@zcx616488494 你当前项目的package.json

@zcx616488494

This comment has been minimized.

Copy link

commented Mar 21, 2019

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

@wanghang2017

This comment has been minimized.

Copy link

commented Mar 21, 2019

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

@cundi

This comment has been minimized.

Copy link

commented Mar 22, 2019

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

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

赞,解决了我的问题

@wyyfcfm

This comment has been minimized.

Copy link

commented Mar 22, 2019

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

fish-uncle added a commit to fish-uncle/evy that referenced this issue Apr 29, 2019

### 更新
* 前端表单校验规则自定义优化
* 授权管理 选择优化
* 新增版本依赖 history@4.7.2 为避免引起[bug](ReactTraining/history#677)

@lock lock bot locked as resolved and limited conversation to collaborators May 21, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
10 participants
You can’t perform that action at this time.