GatsbyJS init with version v2.6.0? - npm

I'm trying to create a new gatsbyjs site but I don't want to use the new v3 as I'm using a template which only supports v2.6.0 how can I run npm gatsby init on v2.6.0

Just:
npm install gatsby#2.6.0
You can read for further details about npm-install command at the docs.
You can clone your template and lower the Gatsby version if needed.

Related

The Amplify CLI can NOT find command: pull

I have just installed amplify cli through the command:
npm install #aws-amplify/cli
It mentions it has installed version 4.2.0.
Following the directions of the document below, I tried to run an "Amplify Pull" command to rearrange my files based on the contents on the cloud:
https://aws-amplify.github.io/docs/cli-toolchain/quickstart
However it tells me that The Amplify CLI can NOT find command: pull
Is it correct? Which command should I run instead of this one?
Can you confirm you ran npm install -g #aws-amplify/cli (note the -g flag)? Otherwise, you may have an older global amplify, while your local project has the newer amplify.
which amplify should return something like /usr/local/bin/amplify
amplify --version should return 4.2.0
It seems like changing the F (capital) to f (lowercase) solved my issue:
amplify remove Function
The Amplify CLI can NOT find command: remove Function
Scanning for plugins...
amplify remove function
No resources added for this category
p.s (Function is the name of the category)

Vue CLI no longer asks a for feature selection

When creating a new Vue (2.x) project using Vue CLI v4 with the command:
vue create example
...I should be prompted for selecting which features I'd like to enable. For some reason, the CLI jumps straight to creating the project, presumably with features I've selected before.
How can I get the cli to let me specify features again?
It seems your Vue CLI installation is somehow toasted.
As the first fix attempt I'd try deleting the file .vuerc file in your user home directory (~/.vuerc) where Vue CLI stores the saved presets.
If that doesn't help, I'd recommend reinstalling the Vue CLI package globally:
Steps to reinstall Vue CLI globally
# If Vue CLI is installed globally, remove the installation
# Check globally installed packages list with NPM
npm list -g --depth 0
# OR with Yarn
yarn global ls
# Depending on which package manager it has been installed with
# Uninstall with NPM
npm uninstall -g #vue/cli
# OR with Yarn
yarn global remove #vue/cli
# Install currently newest Vue CLI version with NPM
npm install -g #vue/cli
# OR with Yarn
yarn global add #vue/cli
It seems that your project set prompt=false and use JSON to create projects. As far as I know, you should set prompt=true or for each project use should use:
vue create example --default
This should prompt features (>manually select features).
In Vue's Documentation, you can find the create project options creating projects with Vue
In Reactgo page, they showed some features of project creation process How to create Vue project
The issue for me was that I was using Git Bash to vue create app-name instead of Windows CMD.
Once I re-ran the command in Windows CMD the Vue feature selection worked properly.

How to build Nuxt.js project using downloaded create-nuxt-app

I downloaded the repository nuxt/create-nuxt-app. Then I modified some codes.
I would like to build Nuxt.js project using this modified create-nuxt-app, not using release version.
How to build Nuxt.js project using downloaded create-nuxt-app
I am glad to inform you that the problem is now solved!
I uploaded the modified create-next-app to my Github account.
I executed this command:
npx github:my-github-account/create-nuxt-app my-app

Install React-Admin package from specific branch or with open pull request

I am having difficulties trying to install a development branch of React-Admin packages with NPM in an active project, specifically:
ra-tree-ui-materialui
ra-tree-core
To have the changes made in this PR https://github.com/marmelab/react-admin/pull/3379
Is there any way of doing this in a similar way to how you normally would put this in package.json ("username/repo#branch")
It is difficult to install a local version of one of React Admin's package, because we use a mono-repository that contains all the packages.
I see two solutions to your needs.
Install the alpha builds
The core team had just published an alpha for the next version of React Admin. It's not stable yet, but you can try it by running :
npm install --save ra-tree-core#next
npm install --save ra-tree-ui-materialui#next
Install a local version for development
If you want to tweak the React Admin packages while you are using them, you can fork the whole repo and use symbolic links.
# On a separate folder
git clone git#github.com:marmelab/react-admin.git
cd react-admin
make install
make build
cd packages/ra-tree-core
npm link # This will make this package available for linking
And on your project, then run:
npm link ra-tree-core
This will create a symbolic link between your local ra-tree-core and your node_module folder.
I showed these examples with npm, but yarn link works too.

How to generate Stencil+Ionic4 PWA components with CLI

I'm using Stencil with Ionic4 to create a PWA. I've generated my project with this command:
npx create-stencil ionic-pwa
How can I generate a new component using the CLI? Which CLI do I have to use? Stencil or Ionic CLI? Could you please give me an example (e.g. generate component my-new-component).
I've found this third-party tool, which works well.
https://github.com/AkashGutha/generator-stencil
npm install -g yo
npm install -g generator-stencil
yo stencil:component