执行 ng config xxx 后 ng xxx 命令报错 重装@angular/cli仍然报错
报错信息
1 | Workspace needs to be loaded before it is used. |
解决方案
删除angular-config.json文件
1 | rm ~/.angular-config.json |
( ´ ▽ ` )ノ`)
ng config xxx 后 ng xxx 命令报错 重装@angular/cli仍然报错报错信息
1 | Workspace needs to be loaded before it is used. |
解决方案
删除angular-config.json文件
1 | rm ~/.angular-config.json |
建议使用nvm安装
1 | curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash |
node版本管理神器 n
1 | # 需要roo权限 |
yarn1 | npm i -g yarn |
@angular/cli1 | npm i -g @angular/cli@6.0.0 |
1 | # 添加css预处理器scss [angular cli css preprocessor](https://github.com/angular/angular-cli/wiki/stories-css-preprocessors) |
1 | cd angular6-demo |
1 | brew install nginx |
配置文件: /usr/local/etc/nginx/nginx.conf
1 | http { |
如果日志文件的路径不存在, 则需要先创建: sudo mkdir -p /var/log/nginx/
修改访问权限: sudo chmod -R a+rw /var/log/nginx/
如果出现没有权限访问access.log文件, 可手工创建, 并修改权限:
touch /var/log/nginx/access.log && sudo chmod a+rw /var/log/nginx/access.log
配置文件: /usr/local/etc/nginx/proxy.conf
1 | proxy_redirect off; |
配置文件: /usr/local/etc/nginx/servers/food.conf
注意:
请将配置文件中的 /root/workspace/project/src 修改为本地路径
#测试服务器
1 | upstream sandbox { |
#正式服务器
1 | upstream deploy { |
1 | server { |
1 | nginx -t |
1 | nginx |
1 | nginx -s reload |
git checkout -b localBranch remote/branchName
1 | git log #查看版本提交日志 |
1 | git ls-remote --tag |
1 | for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do |
1 | # xargs -p 可打印出将执行的命令 |
tag:
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true