git clone git@github.com:chenjun1127/react-redux-todolist.git
cd react-redux-todolist
npm install
或
yarn install
npm run dev
// npm run build(打包)
4、打开浏览器浏览 http://localhost:3000/
Tips:在安装node-sass的时候,有可能不成功,如不成功,请先删除 node_modules ,然后将镜像源换成taobao的,再执行npm install 或 yarn install;
- 删除 node_modules
rd/s/q node_modules
- 切换淘宝镜像源
npm config set registry http://registry.npm.taobao.org
或
yarn config set registry http://registry.npm.taobao.org
- 再安装依赖
npm install
yarn 或 yarn install
也可以单独为node-sass设置淘宝的二进制包镜像
npm config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g
或
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g