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

Trying to use with Parcel getting Unknown plugin dev-expression #428

Closed
grillorafael opened this issue Dec 21, 2017 · 3 comments
Closed

Comments

@grillorafael
Copy link

Dependencies:

   "autoprefixer": "^7.2.1",
    "babel-preset-react-app": "^3.1.0",
    "leaflet": "^1.2.0",
    "node-sass": "^4.7.2",
    "parcel-bundler": "^1.2.1",
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "react-leaflet": "^1.7.8",
    "react-router-dom": "^4.2.2"

Error:

🚨  /home/rafael/Projects/scala/geodb/map_website/new/node_modules/react-leaflet/lib/index.js: Unknown plugin "dev-expression" specified in "/home/rafael/Projects/scala/geodb/map_website/new/node_modules/react-leaflet/.babelrc"     at /home/rafael/Projects/scala/geodb/map_website/new/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
    at Array.map (<anonymous>)
    at Function.normalisePlugins (/home/rafael/Projects/scala/geodb/map_website/new/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/home/rafael/Projects/scala/geodb/map_website/new/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at OptionManager.init (/home/rafael/Projects/scala/geodb/map_website/new/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/home/rafael/Projects/scala/geodb/map_website/new/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/home/rafael/Projects/scala/geodb/map_website/new/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at JSAsset.getParserOptions (/home/rafael/Projects/scala/geodb/map_website/new/node_modules/parcel-bundler/src/assets/JSAsset.js:55:20)
    at <anonymous>
@grillorafael
Copy link
Author

{
  "presets": ["react-app", "stage-1"],
  "plugins": ["dev-expression", "lodash", "transform-proto-to-assign"]
}

Adding stage-1 and all those plugins seems to make it work

@dskgry
Copy link

dskgry commented Dec 24, 2017

Also happens when working with webpack as soon as the node_modules folder is not excluded from the babel-loader rule.

module: { 
            rules: [
                {
                    test: /\.js$/,
                    exclude: /(node_modules)/,      <--- removing this line will cause the same error.
                    use: [{
                        loader: 'babel-loader',
                    }]
                },
            ]
}

@PaulLeCam
Copy link
Owner

If you want to compile this library you'll need to install the dependencies, but you're likely better off using the compiled files unless you have a specific need to use the sources.

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

No branches or pull requests

3 participants