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

Webpack Issues #106

Closed
brianblakely opened this issue Aug 27, 2016 · 3 comments
Closed

Webpack Issues #106

brianblakely opened this issue Aug 27, 2016 · 3 comments
Labels
bug Confirmed bug

Comments

@brianblakely
Copy link

My installed packages:

"devDependencies": {
  "babel-core": "^6.13.2",
  "babel-loader": "^6.2.5",
  "babel-plugin-transform-es2015-modules-commonjs": "^6.14.0",
  "babel-preset-babili": "0.0.1",
  "babili": "0.0.3",
  "browserify-versionify": "^1.0.6",
  "ify-loader": "^1.0.3",
  "shader-loader": "^1.2.1",
  "webpack": "^1.13.2",
  "webpack-dev-server": "^1.14.1"
}

My babel loader config:

{
  test: /\.js$/,
  exclude: /(node_modules)/,
  loader: `babel`,
  query: {
    presets: [`babili`],
    plugins: [`transform-es2015-modules-commonjs`]
  }
}

Error upon running webpack-dev-server --inline --colors:

ERROR in ./script.js
Module build failed: Error: Cannot find module 'babel-types'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/babel-preset-babili/node_modules/babel-plugin-minify-mangle-names/lib/renamer.js:14:9)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
 @ multi main

I explicitly installed babel-types, and now get this error upon re-running:

ERROR in ./script.js
Module build failed: Error: Plugin 0 specified in "foreign" provided an invalid property of "name"
    at Plugin.init (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/plugin.js:138:13)
    at Function.normalisePlugin (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:147:12)
    at /home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:181:30
    at Array.map (native)
    at Function.normalisePlugins (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:153:20)
    at OptionManager.mergeOptions (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:245:36)
    at /home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:289:14
    at /home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:342:20
    at Array.map (native)
    at OptionManager.resolvePresets (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:305:20)
 @ multi main
@boopathi
Copy link
Member

Thanks for reporting!

The name property of the plugin isn't supported by babel < 6.14.0... Will find a fix for this..

@boopathi boopathi added the bug Confirmed bug label Aug 27, 2016
boopathi added a commit that referenced this issue Aug 27, 2016
+ Remove unused renamer
+ (Close #106)
boopathi added a commit that referenced this issue Aug 27, 2016
+ Remove unused renamer
+ #106
kangax pushed a commit that referenced this issue Aug 29, 2016
* Comment out old mangler

+ Remove unused renamer
+ #106

* Remove old renamer

* Remove updateRefs comment
@jxintang
Copy link

@boopathi

but the newest version of babel is 6.5.2...

@mikemaccana
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

4 participants