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

update babel to version 7 #21

Closed
achmadk opened this issue Aug 30, 2018 · 3 comments
Closed

update babel to version 7 #21

achmadk opened this issue Aug 30, 2018 · 3 comments

Comments

@achmadk
Copy link
Contributor

achmadk commented Aug 30, 2018

Hello, @aichbauer. This module is useful for me to create REST API back-end. Now, I am using babel version 7 in my project. I have used this package for mapping routes easily. Unfortunately, I have this error message after updating to babel version 7.

Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.
    at throwVersionError (${MY_PROJECT_DIR}\node_modules\@babel\helper-plugin-utils\lib\index.js:65:11)
    at Object.assertVersion (${MY_PROJECT_DIR}\node_modules\@babel\helper-plugin-utils\lib\index.js:13:11)
    at api (${MY_PROJECT_DIR}\node_modules\@babel\plugin-proposal-function-sent\lib\index.js:51:7)
    at ${MY_PROJECT_DIR}\node_modules\@babel\helper-plugin-utils\lib\index.js:19:12
    at Function.memoisePluginContainer (${MY_PROJECT_DIR}\node_modules\babel-core\lib\transformation\file\options\option-manager.js:113:13)
    at Function.normalisePlugin (${MY_PROJECT_DIR}\node_modules\babel-core\lib\transformation\file\options\option-manager.js:146:32)
    at ${MY_PROJECT_DIR}\node_modules\babel-core\lib\transformation\file\options\option-manager.js:184:30
    at Array.map (<anonymous>)
    at Function.normalisePlugins (${MY_PROJECT_DIR}\node_modules\babel-core\lib\transformation\file\options\option-manager.js:158:20)
    at OptionManager.mergeOptions (${MY_PROJECT_DIR}\node_modules\babel-core\lib\transformation\file\options\option-manager.js:234:36)
    at OptionManager.init (${MY_PROJECT_DIR}\node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12)
    at compile (${MY_PROJECT_DIR}\node_modules\babel-register\lib\node.js:103:45)
    at loader (${MY_PROJECT_DIR}\node_modules\babel-register\lib\node.js:144:14)
    at Object.require.extensions.(anonymous function) [as .js] (${MY_PROJECT_DIR}\node_modules\babel-register\lib\node.js:154:7)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at ${MY_PROJECT_DIR}\node_modules\express-routes-mapper\lib\index.js:66:17
    at Array.forEach (<anonymous>)
    at mapRoutes (${MY_PROJECT_DIR}\node_modules\express-routes-mapper\lib\index.js:47:13)
    at Object.<anonymous> (${MY_PROJECT_DIR}\src\index.js:74:59)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Module._compile (${MY_PROJECT_DIR}\node_modules\pirates\lib\index.js:83:24)

Can I help you to upgrade this module using babel 7?

@aichbauer
Copy link
Owner

Hello @achmadk,

thank you for your issue.

I think updating the babel version in this package would do the trick.

Would you mind creating a Pull Request to fix this issue?

@achmadk
Copy link
Contributor Author

achmadk commented Sep 1, 2018

I have created a pull request. According to travis CI review, express-routes-mapper cannot be used in node 4.

@aichbauer
Copy link
Owner

Thank you.

I will take a look into your PR this week. I think dropping node 4 would not be a problem, since the current stable is 10, and the maintenance for node 4 ended this year in April.

aichbauer pushed a commit that referenced this issue Sep 16, 2018
* upgrade babel to version 7 inside core codes

* update babel to v7, use @babel/node instead gulp

* improve coverall value from 90 to 100

* move several @babel packages to devDependencies

* remove node v4 in travis.yml
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

2 participants