"npm install -g generator-angular-fullstack " in OSX - javascript

I tried to setup MEAN stack where I required angular to be installed. When I tried this command "npm install -g generator-angular-fullstack", I ended up with following error in terminal.enter image description here

No Need to install fullstack for angular js. you can simply go with installation of angular like npm install angular and include dependency in your respective index.html file
You can use this link for refernace

Related

Unable to use typescript with expo - "It looks like you're trying to use TypeScript but don't have the required dependencies installed"

I am receiving an error while trying to use Typescript with my existing expo project.
While following the docs, I created a tsconfig.json file in the project root.
When running expo start, I am prompted to install the typescript dependencies. However, after these are successfully installed (tick message appears in console: √ Installed typescript#~4.3.5, #types/react#~17.0.21, #types/react-native#~0.67.6), I receive the following error:
It looks like you're trying to use TypeScript but don't have the required dependencies installed.
Please install #types/react by running:
yarn add --dev #types/react#~17.0.21
If you're not using TypeScript, please remove the TypeScript files from your project and delete the tsconfig.json.
error Command failed with exit code 1.
After following the instructions and running the yarn add .... command, I keep seeing the same error message.
I have tried deleting the node_modules folder and package-lock.json file to no avail. I have also tried following this answer.
Any assistance would be appreciated, thank you.
Seems to be a bug. It works if I install #types/react on the specific version that Expo requests (17.0.21).
yarn add --dev #types/react#17.0.21
Just re-install expo-cli npm install -g expo-cli.
I don't know which of the following worked, but I ran the following commands and the problem went away.
sudo npm install -g expo-cli
sudo npm install -g #types/react
sudo npm install -g #types/react-native
sudo npm install -g typescript
yarn add expo-cli
solved for me.
I had the same issue. I resolved it by :
1- delete the node_modules.
2- update expo to the latest version using npm i -g expo-cli
hope this will help someone
if you installed #types/react remove that from your dev dependencies

Can I install react native Cli through terminal globally?

I want to install react-native cli but I don't where to run this command: npm install -g react-native-cli. Do I need to run this command on my macOS terminal or when I will make a directory for my react native app then there I need to run this command in vscode?
Is there any issue if I run this command in my terminal or If I run this in VScode?
React Native is distributed as two npm packages, react-native-cli and react-native.
The first one is a lightweight package that should be installed globally (npm install -g react-native-cli), while the second one contains the actual React Native framework code and is installed locally into your project when you run react-native init.
Because react-native init calls npm install react-native, simply linking your local GitHub clone into npm is not enough to test local changes.
npm install –g react-native-cli
· This line installs the npm package react-native-cli along with its dependencies(from the npm repository host) inside the globally shared node_modules folder.
· Global install (with -g): puts stuff in /usr/local or wherever node is installed. This will also allow you to access the module from the command-line, as the bin is symlinked into a PATH folder (usually usr/local/bin).
Refer below link
https://rlogicaltech.medium.com/how-to-install-react-native-on-mac-step-by-step-guide-1ac822aedd4f
You can run the command anywhere in the terminal.
It will install the react-native-cli globally as we are specifying the "-g" option in the command.
Use this
npm install -g expo-cli
this how I solved it.
npm install -save react-native#latest

create-react-app Error: Cannot find module 'react-scripts/scripts/init.js'

Everytime I try to create a brand new project with create-react-app I get this error:
Error: Cannot find module 'react-scripts/scripts/init.js'
Screenshot
THE WAY I CREATE PROJECT:
npx create-react-app new-project
node -v v12.13.1
npm -v 6.12.1
OS Win10
already tried:
npm uninstall -g create-react-app
different project paths
by the way:
the problem disappears when I use --use-npm flag
Any ideas what the reason can be?
Open your command prompt and type "node -v" as well as "npm -v", What do you get there as a response?
Here i found an answer to the same issue, https://stackoverflow.com/a/63334241/7857368
have your tried creating the app with npx create-react-app myapp you don't need to install the create-react-app globally anymore with this command.
Try running the following commands:
npm install
npm install react-scripts
npx create-react-app App-name
React-scripts issue is issue with webpack and babel mostly. You should
create a brand new project using npx create-react-app projectName and this is the recommended approach. This way you don't have to globally install create-react-app in your machine which was previous approach.
Have a look at the documentation. https://reactjs.org/docs/create-a-new-react-app.html
NOTE:
For npx create-react-app projectNameto work. Your node and npm
should be: Node >= 8.10 and npm >= 5.6
And you will have to uninstall old create-react-app from the
machine. See the doc: https://create-react-app.dev/docs/getting-started

Webpack-Cli dependency error in asp.net core 2.0 compilation

I have a asp.net core react app and using webpack for bundling .I have installed required dependencies but when build application it shows an error.
How could i resolve this error.
I have installed required dependencies so many times done npm cache clean and restarted a machine.still its showing not installed in vs solution explorer.
webpack installed in requied folder.
IN vs solution
when try to restore package inside solution explorer,its not installed.
webpack-cli is missing
You doing wrong in your npm install
Should be this command for global
npm i -g webpack-cli
or this command for local
npm i -D webpack-cli
You can not mix up between -D -g flag
If that didn't work for you try to right click on that package and click restore
Update:
Try to delete package-lock.json then run npm i -D webpack-cli again

Yeoman won´t scaffold backbone app

I'm using yeoman to scaffold a backbone app with the generator-backbone, however, everytime I run yo backbone, it ends up with this messages:
I'm all done. Running bower install for you to install the required dependencies. If this fails, try running the command yourself.
I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself.
npm WARN package.json webdev#0.0.0 No description
npm WARN package.json webdev#0.0.0 No repository field.
npm WARN package.json webdev#0.0.0 No README data
And then, my directory is empty. There is no scaffold whatsoever.
The steps I took were this:
Create a directory: mkdir test
cd into test: cd test
run the generator: yo backbone
I don´t know what else to do, my directory always appears empty!
I tried to follow the same steps as you described but not able to reproduce the issue.
But you can try reinstalling generator-backbone.
npm cache clean
npm install -g generator-backbone#0.2.2
Please lemme know if you face the same issue after these steps.

Categories