angular-university / rxjs-course Goto Github PK
View Code? Open in Web Editor NEWRxJs In Practice Course - https://angular-university.io/course/rxjs-course
License: MIT License
RxJs In Practice Course - https://angular-university.io/course/rxjs-course
License: MIT License
For some time GitHub checks the file package-lock.json to detect vulnerabilities - this course as it exists today results with the following diagnose (as a consequence of running npm install
:
found 39 vulnerabilities (27 low, 3 moderate, 9 high) in 24102 scanned packages
run `npm audit fix` to fix 25 of them.
14 vulnerabilities require semver-major dependency updates.
I am proposing to update the file `package.json' to be:
{
"name": "rxjs-course",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "./node_modules/.bin/ng serve --proxy-config ./proxy.json",
"server": "./node_modules/.bin/ts-node ./server/server.ts",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "7.0.0",
"@angular/cdk": "^7.0.0",
"@angular/common": "7.0.0",
"@angular/compiler": "7.0.0",
"@angular/core": "7.0.0",
"@angular/forms": "7.0.0",
"@angular/http": "7.0.0",
"@angular/material": "^7.0.0",
"@angular/material-moment-adapter": "7.0.0",
"@angular/platform-browser": "7.0.0",
"@angular/platform-browser-dynamic": "7.0.0",
"@angular/router": "7.0.0",
"body-parser": "^1.18.3",
"core-js": "^2.4.1",
"express": "^4.16.2",
"hammerjs": "^2.0.8",
"moment": "^2.22.2",
"rxjs": "6.3.3",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.11.0",
"@angular/cli": "^7.1.0",
"@angular/compiler-cli": "7.0.0",
"@angular/language-service": "7.0.0",
"@types/express": "^4.0.39",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "^3.1.1",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.1",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "3.1.3"
}
}
After running the npm install with this package.json
, run the following:
npm update fsevents --depth 6
npm update request --depth 3
npm update fill-range --depth 7
This results with clean build - 0 vulnerabilities
When trying to import a function or whatever from the util.ts file located under src/app/common/util.ts. Normally this should work, but it doesnt :(. The auto completition works for other things (angular or rxjs), but when I try to import a global interface or function, I can't import it. The only way is by adding the import and writing the path by hand.
I did a git clone from the repository, so didn't change all the tsconfig files.
I thought that my typescript wasn't updated, so I installed the latest version, but that wasn't the solution.
Thank you for your help.
Since the latest commit moving the project to Angular 9, ng serve that is executed by the start script in package.json has been failing. I am working from the 1-operators branch. The error is coming from CourseComponent. The lessons$ and course$ observables are missing in the controller but are referenced in the view.
In course-dialog component, save() function is missing in component code. This can be solved either by
I am trying to run this app in visual studio code but I am getting "this site cannot be reached" when using port 9000,
Config:
Windows 10 Enterprise, build 19044.1645
Angular CLI: 13.0.4
Node: 16.14.2
Package Manager: npm 6.14.5
OS: win32 x64
Angular: 13.0.3
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router
@angular-devkit/architect (0.1300.4)
@angular-devkit/build-angular (13.0.4)
@angular-devkit/core (13.0.4)
@angular-devkit/schematics (13.0.4)
@angular/cli (13.0.4)
@schematics/angular (13.0.4)
rxjs (6.5.4)
typescript (4.4.4)
When I find all the instances of port 9000 and change it to 4200, the application runs but I cannot hit the courses api. I get a 404 error. Also, when I run it under port 9000 using "npm start", the command line shows:
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Any help is appreciated.
CTC+vvenugopal@AZJ-L-FBPHNN3 MINGW64 /c/Vinay/Learning/Angular/rxjs-course (master)
$ npm install
npm WARN config global --global
, --local
are deprecated. Use --location=global
instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/tslint
npm ERR! dev tslint@"~6.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer tslint@"^3.9.0" from [email protected]
npm ERR! node_modules/codelyzer
npm ERR! dev codelyzer@"^0.0.28" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/tslint
npm ERR! peer tslint@"^3.9.0" from [email protected]
npm ERR! node_modules/codelyzer
npm ERR! dev codelyzer@"^0.0.28" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\vvenugopal\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\vvenugopal\AppData\Local\npm-cache_logs\2022-09-10T04_52_29_431Z-debug-0.log
When I try to run the server using:
$ ts-node ./server/server.ts
I got this
import * as express from 'express';
^
SyntaxError: Unexpected token *
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:493:23)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Object.require.extensions.(anonymous function) [as .ts] (/usr/local/lib/node_modules/ts-node/src/index.ts:496:12)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at Object.<anonymous> (/usr/local/lib/node_modules/ts-node/src/bin.ts:158:12)
at Module._compile (internal/modules/cjs/loader.js:778:30)
In master branch and 1-operators branch.
Unfortunately, a new version of node and angular make it hard to run server and client. in order to work just change the package.json file and you will be good to go.
line code 7 and 8 inside package.json
"start": "ng serve --proxy-config ./proxy.json", "server": "ts-node -P ./server/server.tsconfig.json ./server/server.ts",
for server -> npm run server
for client -> npm start
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.