Search code examples
reactjsnpmhandlebars.jscreate-react-app

create-react-app: Template was precompiled with an older version of Handlebars


I just installed create-react-app package following the instructions on https://github.com/facebookincubator/create-react-app.

After that I've followed the instructions and created a "myapp" app:

$ create-react-app --version
1.0.4

$ create-react-app myapp

Creating a new React app in /home/...mydir.../myapp.

Installing packages. This might take a couple minutes.
Installing react-scripts...

After the list of installed packages I've got:

Success! Created myapp at /home/...mydir.../myapp
Inside that directory, you can run several commands:

  npm start
    Starts the development server.

  npm run build
    Bundles the app into static files for production.

  npm test
    Starts the test runner.

  npm run eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd myapp
  npm start

Happy hacking!

Ok, but when I'm running the server I've got the following message on browser console:

Template was precompiled with an older version of Handlebars than the current
runtime. Please update your precompiler to a newer version (>= 4.0.0) or downgrade
your runtime to an older version (>= 2.0.0-beta.1).

I've verified the handlebars version :

$ npm ls|grep handlebars
  │   │   └─┬ [email protected]

I've also tried to set the handlebars version on package.json under "devDependencies" and "dependencies" but that didn't work.

Any ideas on how to solve this?


Solution

  • This is a bug in Code Climate Chrome extension.
    If you uninstall it, the error will go away.