Coder Social home page Coder Social logo

demo's Introduction

DEMO

目录规则

直接在根目录下创建文件夹存放相关DEMO,DEMO文件夹名要具有语义化:

- kissy-io-demo/
- react-web-hello-demo/
- webgl-hello-game-demo/
- vr-game-demo/
...

demo's People

Contributors

barretlee avatar nanqiu avatar wibud avatar yuanyan 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

demo's Issues

why can't react-web start?

ERROR in ./index.web.js
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in Z:\code\RNCode\RNBxvip
@ ./index.web.js 1:291-322

ERROR in .//react-web/Libraries/ScrollView/ScrollView.web.js
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\ScrollView
@ ./
/react-web/Libraries/ScrollView/ScrollView.web.js 12:14-34

ERROR in .//react-web/Libraries/ListView/ListView.web.js
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\ListView
@ ./
/react-web/Libraries/ListView/ListView.web.js 12:14-34

ERROR in .//react-web/Libraries/Slider/Slider.web.js
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\Slider
@ ./
/react-web/Libraries/Slider/Slider.web.js 13:14-34

ERROR in .//react-web/Libraries/TextInput/TextInput.web.js
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\TextInput
@ ./
/react-web/Libraries/TextInput/TextInput.web.js 12:14-34

ERROR in .//react-web/Libraries/Animated/Animated.web.js
Module not found: Error: Cannot resolve module 'react/lib/CSSPropertyOperations' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\Animated
@ ./
/react-web/Libraries/Animated/Animated.web.js 14:27-69

ERROR in .//react-web/Libraries/Utilties/LayoutMixin.js
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\Utilties
@ ./
/react-web/Libraries/Utilties/LayoutMixin.js 10:14-34

ERROR in .//react-web/Libraries/Utilties/NativeMethodsMixin.web.js
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\Utilties
@ ./
/react-web/Libraries/Utilties/NativeMethodsMixin.web.js 11:14-34

ERROR in .//react-web/Libraries/ListView/ScrollResponder.web.js
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\ListView
@ ./
/react-web/Libraries/ListView/ScrollResponder.web.js 14:14-34

ERROR in .//react-web/Libraries/AppRegistry/renderApplication.web.js
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\AppRegistry
@ ./
/react-web/Libraries/AppRegistry/renderApplication.web.js 10:14-34

ERROR in .//react-web/Libraries/Utilties/setNativeProps.web.js
Module not found: Error: Cannot resolve module 'react/lib/CSSPropertyOperations' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\Utilties
@ ./
/react-web/Libraries/Utilties/setNativeProps.web.js 8:26-68

ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js
Module not found: Error: Cannot resolve module 'react/lib/EventPluginRegistry' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\PanResponder
@ ./
/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 8:25-65

ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js
Module not found: Error: Cannot resolve module 'react/lib/ResponderEventPlugin' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\PanResponder
@ ./
/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 9:26-67

ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js
Module not found: Error: Cannot resolve module 'react/lib/EventConstants' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\PanResponder
@ ./
/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 10:20-55

ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js
Module not found: Error: Cannot resolve module 'react/lib/ResponderTouchHistoryStore' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\PanRes
ponder
@ ./
/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 11:32-79
webpack: Failed to compile.

react-web init project

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN [email protected] requires a peer of react-dom@* but none was installed.
npm WARN [email protected] requires a peer of react@^15.3 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^15.3 but none was installed.
npm WARN [email protected] requires a peer of react@>=0.11.0 || ^0.14.0-rc but none was installed.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any
"} (current: {"os":"win32","arch":"x64"})

react-web 报错找不到react 和Cannot resolve module 'react/lib/ReactMount'

运行react-web start后报错:Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in D:\reactweb_workspace\firstReactWeb

package.json如下:
'use strict';

var path = require('path');
var webpack = require('webpack');
var HtmlPlugin = require('webpack-html-plugin');
var HasteResolverPlugin = require('haste-resolver-webpack-plugin');

var IP = '0.0.0.0';
var PORT = 3000;
var NODE_ENV = process.env.NODE_ENV;
var ROOT_PATH = path.resolve(__dirname, '..');
var PROD = 'production';
var DEV = 'development';
let isProd = NODE_ENV === 'production';

var config = {
paths: {
src: path.join(ROOT_PATH, '.'),
index: path.join(ROOT_PATH, 'index.web'),
},
};

var webpackConfig = {
ip: IP,
port: PORT,
devtool: 'cheap-module-eval-source-map',
resolve: {
alias: {
'react-native': 'ReactWeb'
},
extensions: ['', '.js', '.web.js', '.ios.js', '.android.js', '.native.js', '.jsx'],
},
entry: isProd ? [
config.paths.index
] : [
'webpack-dev-server/client?http://' + IP + ':' + PORT,
'webpack/hot/only-dev-server',
config.paths.index,
],
output: {
path: path.join(__dirname, 'output'),
filename: 'bundle.js'
},
plugins: [
new HasteResolverPlugin({
platform: 'web',
nodeModules: ['react-web']
}),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify(isProd ? PROD : DEV),
}
}),
isProd ? new webpack.ProvidePlugin({
React: 'react'
}) : new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new HtmlPlugin(),
],
module: {
loaders: [{
test: /.json$/,
loader: 'json',
}, {
test: /.jsx?$/,
loader: 'react-hot',
include: [config.paths.src],
exclude: [/node_modules/]
}, {
test: /.jsx?$/,
loader: 'babel',
query: {
presets: ['react-native', 'stage-1']
},
include: [config.paths.src],
exclude: [path.sep === '/' ? /(node_modules/(?!react-))/ : /(node_modules\(?!react-))/]
}]
}
};
webpackConfig.resolve.alias[path.basename(ROOT_PATH, '.')] = path.join(ROOT_PATH, '.');

module.exports = webpackConfig;

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.