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

vuepress dev failed with babel error programPath.hub.addHelper is not a function #797

Closed
mactavishz opened this issue Sep 4, 2018 · 2 comments
Labels
type: enhancement Request to enhance an existing feature

Comments

@mactavishz
Copy link
Contributor

Bug report

I got a local repo, using webpack 4 and latest babel 7 for develoment

And I want to use vuepress for documentation

Then I run vuepress dev docs, failed with build errors

ERROR in ./node_modules/vuepress/lib/app/clientEntry.js
Module build failed (from ./node_modules/vuepress/node_modules/babel-loader/lib/index.js):
TypeError: programPath.hub.addHelper is not a function

Version

Latest version: 0.14.2

Steps to reproduce

check this repo for reproduction

What is expected?

fix this weird behaviour

What is actually happening?

I found that if I remove my babel.config.js in the root dir, the build will go green again

Other relevant information

babel/babel#8508

  • Your OS: Mac OS High Sierra (10.13.6)
  • Node.js version: v8.11.4
  • Browser version: latest chrome
  • Is this a global or local install? local
  • Which package manager did you use for the install? yarn
@ulivz ulivz added the has PR Has a related PR label Sep 5, 2018
@zealot09
Copy link

zealot09 commented Sep 13, 2018

http://babeljs.io/docs/en/config-files

in vuepress createBaseConfig.js should add

configFile: false,

@ulivz ulivz removed the has PR Has a related PR label Sep 13, 2018
@ulivz ulivz closed this as completed in 3870ad1 Sep 13, 2018
@ulivz
Copy link
Member

ulivz commented Sep 13, 2018

Release at 0.14.3

@ulivz ulivz added the type: enhancement Request to enhance an existing feature label Sep 13, 2018
AtofStryker added a commit to AtofStryker/vue-test-utils that referenced this issue Aug 1, 2020
Upgraded to latest patch version of vuepress to gain configFile: false fix for babel config. See
vuejs/vuepress#797 for more details.
AtofStryker added a commit to AtofStryker/vue-test-utils that referenced this issue Aug 1, 2020
Upgraded to latest patch version of vuepress to gain configFile: false fix for babel config. See
vuejs/vuepress#797 for more details.
lmiller1990 pushed a commit to vuejs/vue-test-utils that referenced this issue Aug 1, 2020
* build(babel): upgrade from babel 6 to babel 7

Upgrade the babel config from babel 6 to babel 7. This includes a few
subset of changes.

The vue-flow preset has been removed in favor or
direct plugin installation, including 'transform-flow-strip-types',
'syntax-flow', and ' proposal-class-properties'.

Use of 'transform-vue-jsx' plugin, using
@vue/babel-plugin-transform-vue-jsx and @vue/babel-helper-vue-jsx-merge-props to gain babel 7 support

Use proposal decorators with legacy decorators option set to true. This
requires options to be set in the babel-eslint to support since legacy
behavior is deprecated.

Use loose interpretation for proposal class properties to support legacy
proposal decorators. Proposal decorators must come before class
properties in plugin declaration

There were many stage-2 plugins that are not being used and were not
installed:
'proposal-export-namespace-from'
'proposal-function-sent'
'proposal-json-strings'
'proposal-numeric-separator'
'proposal-throw-expressions'
'syntax-import-meta'

@babel/polyfill now replaces babel-polyfill. @babel/polyfill is
currently deprecated, and should be replaced in a future PR. Please see
https://babeljs.io/docs/en/babel-polyfill for more details

* chore(.vuepress): upgrade vuepress to 0.14.8

Upgraded to latest patch version of vuepress to gain configFile: false fix for babel config. See
vuejs/vuepress#797 for more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Request to enhance an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants