Giter Site home page Giter Site logo

react-family's Issues

node 执行js

\react-family\src\redux>node build

报错: Unexpected token import

与spring boot 整合方式

博主,我想请教一下这个工程的部署方式,我直接点击index.html打开浏览器一片空白。

路由报错

路由报错 切换到react-redux 4.x版本依然报错;大神帮忙看看
_20180621103646

早上好,砖家

请教您一个问题,就是 react-router 4.0 + 可以实现嵌套路由吗,网上的资料确实有限,目前还没发现一个标准答案,嘿嘿。

热更新的时候有个 warning

patch.dev.js:141 React Hot Loader: this component is not accepted by Hot Loader. Please check is it extracted as a top level class, a function or a variable. Click below to reveal the source location: ƒ (props) { return _react2.default.createElement( _Bundle2.default, { load: component }, function (Component) { return Component ? _react2.de…

webpack

$ webpack --config webpack.dev.config.js
Hash: 908c34d03b5wefwefw
Version: webpack 3.12.0
Time: 38ms
Asset Size Chunks Chunk Names
bundle.js 2.72 kB 0 [emitted] main
[0] ./src/index.js 248 bytes {0} [built] [failed] [1 error]

ERROR in ./src/index.js
Module parse failed: Unexpected token (4:16)
You may need an appropriate loader to handle this file type.
| import ReactDom from 'react-dom';
|
| ReactDom.render(

Hello React!
, document.getElementById('app'));
|

webpack 和webpack-dev-server版本问题

用最新版的webpack 和webpack-dev-server,在webpack-dev-server服务器运行时会报错。后来看了package.json改了版本。。在安装的时候指定版本会不会好点.

使用 babel-preset-env

在安装 babel-preset-es2015 时,注意到现在推荐使用 babel-preset-env

npm WARN deprecated [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!

于是就了解了一下 babel-preset-env,它可以根据运行环境智能的转换代码,而不是一股脑的转换成 ES5,更能充分的发挥新版本的特性。是否考虑使用 babel-preset-env 替换大堆预设?

Warning: forceUpdate(...): Can only update a mounted or mounting component. This usually means you called forceUpdate() on an unmounted component. This is a no-op. Please check the code for the UserInfo component.

页面切换的时候会出现这个警告 不太清楚这个警告是由于什么原因导致的
Warning: forceUpdate(...): Can only update a mounted or mounting component. This usually means you called forceUpdate() on an unmounted component. This is a no-op. Please check the code for the UserInfo component.

npm start 报错

[email protected] start /Users/wuwentao/Desktop/demo/react-family
webpack-dev-server --config webpack.dev.config.js --color --progress --hot

10% building modules 2/2 modules 0 activeevents.js:167 r throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE 0.0.0.0:8080
at Server.setupListenHandle [as _listen2] (net.js:1336:14)
at listenInCluster (net.js:1384:12)
at doListen (net.js:1510:7)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:266:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
Emitted 'error' event at:
at emitErrorNT (net.js:1363:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
[... lines matching original stack trace ...]
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: webpack-dev-server --config webpack.dev.config.js --color --progress --hot
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wuwentao/.npm/_logs/2018-12-24T11_04_33_602Z-debug.log

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.