If you have been wanting to use Foundation for Emails, you’ll notice that the email building framework has not been updated since 2016. That’s over 3 years ago.
Here is what you need to do to get the packages building to start your next email template.
1. If you have not already, install the foundation-cli tooling for node.
npm install --global foundation-cli
2. Then build your email project.
foundation new --framework emails
3. Then you’ll notice the first issue the framework has when building.
The node modules did not install. Change directories into the project folder so that we can fix the issue.
I like to use a tool called npm-check to update my node modules. When you have npm-check installed run npm-check -u
in the project directory to see a list of all the outdated packages.
npm install npm-check -g
npm-check -u
Update all the modules and you’ll then see the node_modules directory.
4. Now we can build the project
Now when you run npm run build
, you’ll still get an error. The issue here is how gulp was added to the framework. We will have to fix this.
First, open the package.json
files for the project and delete the line for gulp under the devDependencies.
Next, delete the package-lock.json
file. Reinstall gulp with npm install gulp -D
. Then finally run npm run build
.
rm package-lock.json
npm install gulp -D
npm run build
Now you can use the framework as intended.