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

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
Copy link

我也遇到了同样的问题

@Furholeder
Copy link

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

@zry754331875
Copy link
Author

@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
Copy link

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

@tang-yue
Copy link

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

@wanghang2017
Copy link

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

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

@tang-yue
Copy link

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

@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
Copy link
Author

@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
Copy link

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

@tang-yue
Copy link

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

@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
Copy link

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

@xiaobc1234
Copy link

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

@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
Copy link

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

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

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

@wanghang2017
Copy link

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

@wanghang2017
Copy link

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

@xiaobc1234
Copy link

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

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

@Super-Ps
Copy link

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

@AdamFu
Copy link

AdamFu commented Mar 20, 2019

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

有效,666

@zcx616488494
Copy link

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

@wanghang2017
Copy link

@zcx616488494 你当前项目的package.json

@zcx616488494
Copy link

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

@wanghang2017
Copy link

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

@cundi
Copy link

cundi commented Mar 22, 2019

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

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

赞,解决了我的问题

@wyyfcfm
Copy link

wyyfcfm commented Mar 22, 2019

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

@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants