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

errored out during transformation Cannot read property 'constant' of undefined #14

Closed
adarshmadrecha opened this issue Dec 22, 2020 · 2 comments
Labels
duplicate This issue or pull request already exists upstream Blocked on upstream dependency

Comments

@adarshmadrecha
Copy link

I am using this plugin in documentation site created using vuepress (Vue based static site generator)

// .vuepress/config.js

const OptimizePlugin = require('optimize-plugin');
configureWebpack: {
    plugins: [
      new OptimizePlugin({
        downlevel: false,
      })
    ],
  }

Error Details

errored out during transformation  TypeError: C:\dev\jamkudoc\1.server-bundle.js: Cannot read property 'constant' of undefined
    at PluginPass.FunctionExpression|FunctionDeclaration (C:\dev\jamkudoc\node_modules\babel-preset-modernize\dist\plugins\transform-iife-arrows\index.js:1:424)
    at newFn (C:\dev\jamkudoc\node_modules\optimize-plugin\node_modules\@babel\traverse\lib\visitors.js:175:21)
    at NodePath._call (C:\dev\jamkudoc\node_modules\optimize-plugin\node_modules\@babel\traverse\lib\path\context.js:55:20)
    at NodePath.call (C:\dev\jamkudoc\node_modules\optimize-plugin\node_modules\@babel\traverse\lib\path\context.js:42:17)
    at NodePath.visit (C:\dev\jamkudoc\node_modules\optimize-plugin\node_modules\@babel\traverse\lib\path\context.js:92:31)
    at TraversalContext.visitQueue (C:\dev\jamkudoc\node_modules\optimize-plugin\node_modules\@babel\traverse\lib\context.js:115:16)
    at TraversalContext.visitMultiple (C:\dev\jamkudoc\node_modules\optimize-plugin\node_modules\@babel\traverse\lib\context.js:79:17)
    at TraversalContext.visit (C:\dev\jamkudoc\node_modules\optimize-plugin\node_modules\@babel\traverse\lib\context.js:141:19)
    at Function.traverse.node (C:\dev\jamkudoc\node_modules\optimize-plugin\node_modules\@babel\traverse\lib\index.js:82:17)
    at NodePath.visit (C:\dev\jamkudoc\node_modules\optimize-plugin\node_modules\@babel\traverse\lib\path\context.js:99:18) {
  type: 'TypeError',
  code: 'BABEL_TRANSFORM_ERROR'
@DreierF
Copy link
Contributor

DreierF commented Jan 3, 2021

Duplicate of developit/babel-preset-modernize#3

@developit developit added the upstream Blocked on upstream dependency label Feb 2, 2022
@developit
Copy link
Owner

Also duplicate of #7.

@developit developit added the duplicate This issue or pull request already exists label Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists upstream Blocked on upstream dependency
Projects
None yet
Development

No branches or pull requests

3 participants