Updating ejs to newer version in Sails.js - npm

My current version of Sails uses ejs#0.88. 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?

I wouldn't do that since it could break your app because that version is a Sails dependency.
However, if you want to try:
Locate the "ejs": "~X.Y.Z" in your package.json file (dependencies section)
Update X.Y.Z to the current version number
Run the npm install command
Check that everything is still working ...

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.

Related

How to downgrade Gatsby version from 3.14.2 to ^2.0.0

I have a Gatsby starter (taylorbryant/gatsby-starter-tailwind) that uses gatsby-plugin-postcss which is not compatible with the version of gatsby installed in my machine like a few other plugins used in the starter. You can see the warning I get when trying to build for production.
warn Plugin gatsby-plugin-postcss is not compatible with your gatsby version 3.14.2 - It requires gatsby#^2.0.0
How can I downgrade Gatsby to a specific version, maybe just locally?
This isn't too difficult.
Open your package.json file and change the actual version you want to use.
Then run npm update to make sure you update all the packages to the right version.
Please correct me if I'm wrong but I believe that is the way to change the Gatsby version.
Please do keep in mind that this is most probably cause a bunch of other discrepancies with other packages that actually require a higher version in order to work.
You can find more information about how different versions work here: https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v2-to-v3/
Best of luck!

Error in emotion/styled package, cannot find answer ANYWHERE

I keep getting the following error, I'm using meteor 2.1 currently
Error: A new entrypoint in the #emotion/styled package, #emotion/styled/base, has replaced the #emotion/styled-base package. Please remove this package and use #emotion/styled/base instead.
i cannot find ANY way to install this #emotion/styled/base package. #emotion/styled-base is installed and i cannot create a build suddenly.
any suggestions???
I'm using react.js
#emotion/styled/base isn't a package you need to install, but rather its a submodule of the #emotion/styled package.
I have a hunch that you are not using #emotion/styled-base directly, so most likely what you have is a version mismatch where you have a newer version of #emotion/styled installed, but that package is written for an older version. You'll probably just need to locate this offending package and update it.
If this isn't the case, then you'll just need to replace your imports for #emotion/styled-base with ones for #emotion/styled/base

Would it be possible to follow tutorials that use vue-cli but with CLI 3?

I have just started learning Vue.js. The author is using npm install -g vue-cli but it did not work with me because I got stuck with technical issues and I tried many solutions to fix it but I couldn't.
So I want to follow up with the author but using npm install -g #vue/cli. So Do you think I it will be easy to follow up with him? I mean are these different versions use different syntax?
The vue-cli package seems to be the old cli. The main difference between this version and Vue CLI 3 is that the webpack configuration used to be visible in the project as a build directory. To make changes to the build process you used to have to modify files within this folder. In Vue CLI 3 this has been moved to a helper that consumes a configuration file vue.config.js in the project. The structure of files has been slightly altered in this version of the CLI. Both work with Vue 2.x, so the way you write .vue files has not changed in any way.
Overall you should have little trouble following the tutorial, unless you are going to make changes to the build process. In that case, simply consult the official documentation or find a tutorial that is specifically for Vue CLI 3.

Ember: error while i am running ember serve

I am try to upgrade exisiting ember project cli version by following this tutorial
https://emberigniter.com/update-latest-ember-data-cli/
after finishing this i try to run ember serve it shows error like
missing path
i doknow what exactly it was trying to say and also i am new to ember could any one help me sort out this issue.
I recommend using ember-cli-update to update your ember projects. Please check it out. It avoids user-mistakes while upgrading (no manual merges, etc. ...).
You could try to delete node_modules and run npm install again. It could a package in your package.json that ember serve can't find. Also check the releases it is not easy to upgrade from older version to the latest one, too many deprecations. Also if it si too old i suggest you to start over create again the ember app.

ember-simple-auth with ember-cli

Trying to follow the instructions for using ember-simple-auth with ember-cli here:
http://ember-simple-auth.simplabs.com/
At the start it says to do :
npm install --save-dev ember-cli-simple-auth
ember generate ember-cli-simple-auth
But as soon as I try that 'ember generate' I get the following error:
The `ember generate` command requires an entity name to be specified. For more details, use `ember help`.
So it looks like that ember generate command isn't right... anyone able to help?
Am I to generate an initialiser or something?
Thanks
Two things were needed to sort this out.
Firstly to upgrade the version of ember-cli
This is covered here:
http://www.ember-cli.com/#upgrading-an-ember-cli-app
Use NPM to update to the latest released version of Ember CLI.
npm install --save-dev ember-cli
When you update to the latest version you may need to re-install files from the app blueprint and update Node NPM dependencies.
ember init
This will re-copy files from the project blueprint. You can choose to overwrite existing files or not. It will subsequently call npm install to update any changed dependencies.
And Secondly, needed to find the updated blog instructions for ember-simple-auth:
http://log.simplabs.com/post/90339547725/using-ember-simple-auth-with-ember-cli
which don't include the generate command now.
Typically the blueprints the generators use, require the following syntax:
ember generate <blueprint> <name>
I would expect the usage of simple-auth to follow the convention and you would do something like
ember generate ember-cli-simple-auth <your new route name>
Ember simple auth and ember cli simple auth are two slightly different things. On the ember simple auth page https://github.com/simplabs/ember-simple-auth#ember-cli it says
If you're using Ember CLI, just add the ember-cli-simple-auth Ember
CLI Addon to your project and Ember Simple Auth will setup itself.
which means to do what you are doing you need the ember-cli-simple-auth add on - found here
https://github.com/simplabs/ember-cli-simple-auth
The way to install that is how youve described above.
Ember simple auth has gone through a lot of changes in its time so the page you are getting your instructions from might not be the most up to date. Github is usually the best place to check for solutions to packages if you are having difficulties as the most up to date documentation will most liekly be there.