Git Product home page Git Product logo

steamer-react's Introduction

steamer-react

react 高效快速启动脚手架

NPM Version Deps

快速启动

// 安装 steamerjs,已经内置 steamer-plugin-kit
npm i -g steamerjs
// 下载脚手架到全局
steamer kit --add https://github.com/steamerjs/steamer-react.git
// 基于脚手架初始化项目
steamer kit
  • 直接从github clone 下来

常用命令

// 安装依赖
npm i

// 开发
npm start
// 打开链接
localhost:9000

// 代码规范扫描
npm lint

// 生产代码生成
npm run dist

脚手架文档

参见文档-项目脚手架

文章参考

steamer-react's People

Contributors

lcxfs1991 avatar lukelin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

steamer-react's Issues

Cannot resolve 'file' or 'directory' react/lib/ReactMount

After git cloning your repo, I tried npm run dev. Below is the result:

image

I've searched github and I found this
https://github.com/gaearon/react-hot-loader/blob/master/docs/Troubleshooting.md

Cannot resolve 'file' or 'directory' react/lib/ReactMount

If you're using a precompiled React instead of react npm package, React Hot Loader configuration will need a few tweaks. See Usage with External React.

Make sure you have '.js' in resolve.extensions section of Webpack config, or Webpack won't be able to find any JS files without explicitly specifying extension in require.

According to this, I deleted the react-hot-loader related code in the webpack.dev.js and the whole thing started to functioning again. However I had to give up react-hot-loader which is very useful in my development.

I was thinking that is it because the version of react-hot-loader is out of date so that some function is depracated and the whole thing just crashed down?
If u know the answer, please reply ASAP. Thx.

TypeError: Cannot read property '_statStorage' of undefined

新建项目后,执行npm start报错:

ERROR in ./page/index/container/index.less (../node_modules/cache-loader/dist/cjs.js??ref--11-1!../node_modules/css-loader??ref--11-2!../node_modules/postcss-loader/src!../node_modules/less-loader/dist/cjs.js??ref--11-4!./page/index/container/index.less)
Module build failed (from ../node_modules/cache-loader/dist/cjs.js):
TypeError: Cannot read property '_statStorage' of undefined
    at stat (/Users/ervin/Documents/Project/git/app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:231:8)
    at toDepDetails (/Users/ervin/Documents/Project/git/app/node_modules/cache-loader/dist/index.js:66:5)
    at arrayIterator (/Users/ervin/Documents/Project/git/app/node_modules/neo-async/async.js:3780:9)
    at timesSync (/Users/ervin/Documents/Project/git/app/node_modules/neo-async/async.js:2292:7)
    at Object.mapLimit (/Users/ervin/Documents/Project/git/app/node_modules/neo-async/async.js:3775:5)
    at Array.<anonymous> (/Users/ervin/Documents/Project/git/app/node_modules/cache-loader/dist/index.js:89:18)
    at arrayEachFunc (/Users/ervin/Documents/Project/git/app/node_modules/neo-async/async.js:2512:19)
    at Object.parallel (/Users/ervin/Documents/Project/git/app/node_modules/neo-async/async.js:6867:9)
    at Object.loader (/Users/ervin/Documents/Project/git/app/node_modules/cache-loader/dist/index.js:88:9)
 @ ./page/index/container/index.less 2:14-269 21:1-42:3 22:19-274
 @ ./page/index/container/index.js
 @ ./page/index/root/Root.dev.js
 @ ./page/index/root/Root.hot.js
 @ ./page/index/main.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true&dynamicPublicPath=true&path=__webpack_hmr ./page/index/main.js
Child html-res-webpack-plugin for "index.html":
         Asset      Size  Chunks  Chunk Names
    index.html  28.4 KiB       0
    Entrypoint undefined = index.html
    [../node_modules/html-res-webpack-plugin/libs/loader.js!./page/index/main.html] 1.08 KiB {0} [built]
ℹ 「wdm」: Failed to compile.

ERROR in multi index Module not found & ERROR in multi spa

Steps:

  1. npm install
  2. npm run dev

Error:
ERROR in multi index
Module not found: Error: Cannot resolve module 'react-hot' in /react/steamer-react-react
@ multi index

ERROR in multi spa
Module not found: Error: Cannot resolve module 'react-hot' in /react/steamer-react-react
@ multi spa

无法解析模块'pure-render-deepCompare-decorator/dist'

yarn start

ERROR in ./src/page/common/components/scroll/index-p.js
Module not found: Error: Cannot resolve module 'pure-render-deepCompare-decorator/dist' in /Users/pingfengafei/Desktop/learn-material/steamer-react/src/page/common/components/scroll
 @ ./src/page/common/components/scroll/index-p.js 13:27-59

ERROR in ./src/page/common/components/spinner/index-p.js
Module not found: Error: Cannot resolve module 'pure-render-deepCompare-decorator/dist' in /Users/pingfengafei/Desktop/learn-material/steamer-react/src/page/common/components/spinner
 @ ./src/page/common/components/spinner/index-p.js 13:27-59

ERROR in ./src/page/common/components/spinner/index.js
Module not found: Error: Cannot resolve module 'pure-render-deepCompare-decorator/dist' in /Users/pingfengafei/Desktop/learn-material/steamer-react/src/page/common/components/spinner
 @ ./src/page/common/components/spinner/index.js 12:27-59

ERROR in ./src/page/common/components/touch/index-p.js
Module not found: Error: Cannot resolve module 'pure-render-deepCompare-decorator/dist' in /Users/pingfengafei/Desktop/learn-material/steamer-react/src/page/common/components/touch
 @ ./src/page/common/components/touch/index-p.js 19:27-59

ERROR in ./src/page/index/components/tab/index.js
Module not found: Error: Cannot resolve module 'pure-render-deepCompare-decorator/dist' in /Users/pingfengafei/Desktop/learn-material/steamer-react/src/page/index/components/tab
 @ ./src/page/index/components/tab/index.js 12:27-59

ERROR in ./src/page/index/components/loading/index.js
Module not found: Error: Cannot resolve module 'pure-render-deepCompare-decorator/dist' in /Users/pingfengafei/Desktop/learn-material/steamer-react/src/page/index/components/loading
 @ ./src/page/index/components/loading/index.js 12:27-59

ERROR in ./src/page/spa/components/list/index.js
Module not found: Error: Cannot resolve module 'pure-render-deepCompare-decorator/dist' in /Users/pingfengafei/Desktop/learn-material/steamer-react/src/page/spa/components/list
 @ ./src/page/spa/components/list/index.js 12:27-59

ERROR in ./src/page/spa/components/tab/index.js
Module not found: Error: Cannot resolve module 'pure-render-deepCompare-decorator/dist' in /Users/pingfengafei/Desktop/learn-material/steamer-react/src/page/spa/components/tab
 @ ./src/page/spa/components/tab/index.js 12:27-59

ERROR in ./src/page/spa/components/loading/index.js
Module not found: Error: Cannot resolve module 'pure-render-deepCompare-decorator/dist' in /Users/pingfengafei/Desktop/learn-material/steamer-react/src/page/spa/components/loading
 @ ./src/page/spa/components/loading/index.js 12:27-59

ERROR in ./src/page/index/components/list/index.js
Module not found: Error: Cannot resolve module 'pure-render-deepCompare-decorator/dist' in /Users/pingfengafei/Desktop/learn-material/steamer-react/src/page/index/components/list
 @ ./src/page/index/components/list/index.js 12:27-59

无法找到模块pure-render-deepCompare-decorator

全局搜索文件找到线索:
webpack.dev.jswebpack.prod.js里找到一条alias:
'pure-render-decorator': 'pure-render-deepCompare-decorator/dist/'

但是1.0.1版本node_modules/pure-render-deepCompare-decorator下并没有dist文件夹。
我选择删除dist路径,修改alias:
'pure-render-decorator': 'pure-render-deepCompare-decorator/',

可以正常编译了。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.