Reputation: 149
I am trying to run the following project:
https://github.com/kentcdodds/react-in-angular
This repo is simply an example of using React in AngularJS. There are three tags. Check them out in order to see the process of moving an Angular app to React. Kinda fun and stuff :-)
But after npm install i am getting following error:
npm WARN rm not removing /home/user/react-in-angular/node_modules/.bin/esparse as it wasn't installed by /home/user/react-in-angular/node_modules/esprima-fb
npm WARN rm not removing /home/user/react-in-angular/node_modules/.bin/esvalidate as it wasn't installed by /home/user/react-in-angular/node_modules/esprima-fb
> [email protected] install /home/user/react-in-angular/node_modules/kexec
> pangyp configure build
sh: 1: pangyp: not found
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/kexec):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `pangyp configure build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT
added 126 packages from 149 contributors, removed 72 packages, updated 570 packages and audited 7724 packages in 10.882s
17 packages are looking for funding
run `npm fund` for details
found 7 vulnerabilities (2 low, 5 high)
run `npm audit fix` to fix them, or `npm audit` for details
After runnung npm audit:
=== npm audit security report ===
Manual Review
Some vulnerabilities require your attention to resolve
Visit https://go.npm.me/audit-guide for additional guidance
Low Arbitrary File Write
Package cli
Patched in >=1.0.0
Dependency of 6to5 [dev]
Path 6to5 > jshint > cli
More info https://npmjs.com/advisories/95
High Regular Expression Denial of Service
Package minimatch
Patched in >=3.0.2
Dependency of 6to5 [dev]
Path 6to5 > chokidar > readdirp > minimatch
More info https://npmjs.com/advisories/118
High Regular Expression Denial of Service
Package minimatch
Patched in >=3.0.2
Dependency of 6to5 [dev]
Path 6to5 > jshint > cli > glob > minimatch
More info https://npmjs.com/advisories/118
High Regular Expression Denial of Service
Package minimatch
Patched in >=3.0.2
Dependency of 6to5 [dev]
Path 6to5 > jshint > minimatch
More info https://npmjs.com/advisories/118
Low Prototype Pollution
Package lodash
Patched in >=4.17.5
Dependency of 6to5 [dev]
Path 6to5 > lodash
More info https://npmjs.com/advisories/577
High Prototype Pollution
Package lodash
Patched in >=4.17.11
Dependency of 6to5 [dev]
Path 6to5 > lodash
More info https://npmjs.com/advisories/782
High Prototype Pollution
Package lodash
Patched in >=4.17.12
Dependency of 6to5 [dev]
Path 6to5 > lodash
More info https://npmjs.com/advisories/1065
found 7 vulnerabilities (2 low, 5 high) in 7724 scanned packages
7 vulnerabilities require manual review. See the full report for details.
After running, webpack-dev-server --content-base app:
validateSchema is not a function
How can solve it ?
Upvotes: 0
Views: 11469
Reputation: 1
You have to use npm command prompt while using angular and other frameworks.
Output in CMD:
--> `C:\Users\your_username> ng serve`
==>`'ng' is not recognized as an internal or external command,
operable program or batch file.`
While, the output in Node.js Command Prompt:
--> `C:\Users\your_username> ng serve `
==>
√ Browser application bundle generation complete.
Initial Chunk Files | Names | Raw Size
vendor.js | vendor | 2.10 MB |
polyfills.js | polyfills | 318.07 kB |
styles.css, styles.js | styles | 210.10 kB |
main.js | main | 50.19 kB |
runtime.js | runtime | 6.53 kB |
| Initial Total | 2.67 MB
Build at: 2022-09-11T17:09:51.287Z - Hash: 5f09c87536feee1e - Time: 28707ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
√ Compiled successfully.
Upvotes: 0
Reputation: 1415
The npm log you are receiving is not an error, and probably is not related with the javascript error you are receiving when executing the code.
The NPM log is only referring to optional dependencies that are being skipped because of the current operating system, and security audits, which are recommended to be fixed, but should not affect to the execution.
Upvotes: 1
Reputation: 370
Going off the information you've given I'd suggest try running it with the webpack-dev-server that is installed as part of the application as opposed to the webpack-dev-server you've got globally. Adding "start": "webpack-dev-server --content-base app"
to the package.json and using npm start in the root folder worked for me.
Basing this on webpack.validateSchema is not a function
Upvotes: 0
Reputation: 1580
Try following things
1) Uninstall following package:
npm uninstall webpack webpack-dev-server --save -dev
2) Install following Packages:
npm install --save -dev [email protected]
npm install --save -dev [email protected]
npm install --save -dev [email protected]
Upvotes: 1
Reputation: 1
Try to re install the nodejs new version on the computer
Node js file download direction
(not use the power shell to install use the visual code to run the npm install)
Upvotes: -1