angular5

How to Install Angular 5 (Tutorial)

https://coursetro.com/posts/code/105/How-to-Install-Angular-5-(Tutorial)

 

ubuntu

node -v
apt install nodejs-legacy
npm -v
apt install npm
npm install @angular/cli -g

 

root@frank:/home/frank/angular# ng -v
/usr/local/lib/node_modules/@angular/cli/models/config/config.js:17
    constructor(_configPath, schema, configJson, fallbacks = []) {
                                                           ^
 
SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/models/config.js:3:18)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

 

apt-get 으로 설치한 nodejs가 버전이 낮은 것일까?

소스를 받아 설치를 해 본다.

https://nodejs.org/ko/download/

source download

./configure

make

make install

ln -s /usr/local/bin/node /usr/bin/node

 

 

댓글

댓글 본문
작성자
비밀번호
버전 관리
Frank
현재 버전
선택 버전
graphittie 자세히 보기