Install Eleventy Globally #
Installing globally is a quick way to get started but it is preferred to use local project installation instead. Local installation will cause fewer interoperability issues later if you use Eleventy on multiple projects that may want to use different Eleventy versions.
Don’t include ~ $
when you run these commands.
npm install -g @11ty/eleventy
The above adds an eleventy
command that you can use in any directory.
eleventy --version
1.0.1
If you’re planning on deploying your site using a service like Netlify (that will run your build on their servers), you must use the local installation method and not global installation.
Old, outdated eleventy-cli
#
If you see 0.1.9
after you run eleventy --version
you have installed the deprecated eleventy-cli
instead. We renamed Eleventy to use our @11ty
npm organization a long time ago. You will need to uninstall eleventy-cli
:
npm uninstall -g eleventy-cli