简体   繁体   中英

redux-socket.io/dist/index.js: Couldn't find preset \“es2015\”

I installed "redux-socket.io" and when I run the app again it shows and error like this:

error: bundling failed: "TransformError: ../../../../node_modules/redux-socket.io/dist/index.js: Couldn't find preset \\"es2015\\"

How to solve this?

If you're using babel, you have to install babel-preset-es2015 and use it in your .babelrc , eg:

{
  "presets": ["es2015"]
}

Hope that this can help :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM