pewpewlasers
pewpewlasers

Reputation: 3215

Updating ejs to newer version in Sails.js

My current version of Sails uses [email protected]. There is already a 2.0+ version out. How do I update, for sails.js, the ejs package only? Also is there a way to use a local ejs package?

Upvotes: 1

Views: 747

Answers (2)

jaumard
jaumard

Reputation: 8292

Update only EJS not working cause sails is not compatible (yet?) with this version.

Like the doc sails http://sailsjs.org/documentation/concepts/views/view-engines#adding-new-custom-view-engines

Sails use consolidate lib template and they work to be compatible with EJS V2 : https://github.com/tj/ejs

You can help them to make it compatible or create your own plugin to make it compatible.

Upvotes: 2

Yann Bertrand
Yann Bertrand

Reputation: 3114

I wouldn't do that since it could break your app because that version is a Sails dependency.

However, if you want to try:

  1. Locate the "ejs": "~X.Y.Z" in your package.json file (dependencies section)
  2. Update X.Y.Z to the current version number
  3. Run the npm install command
  4. Check that everything is still working ...

Upvotes: 2

Related Questions