直接在根目录下创建文件夹存放相关DEMO,DEMO文件夹名要具有语义化:
- kissy-io-demo/
- react-web-hello-demo/
- webgl-hello-game-demo/
- vr-game-demo/
...
FED Demo
When I configuration demo on my computer (Windows 7 node v 7.5) ,use IE open localhost:3000 , show error Type Error: Path must be a string. Received undefined ,Please help me
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/react-web/Libraries/ScrollView/ScrollView.web.js 12:14-34
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\ScrollView
@ ./
ERROR in .//react-web/Libraries/ListView/ListView.web.js/react-web/Libraries/ListView/ListView.web.js 12:14-34
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\ListView
@ ./
ERROR in .//react-web/Libraries/Slider/Slider.web.js/react-web/Libraries/Slider/Slider.web.js 13:14-34
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\Slider
@ ./
ERROR in .//react-web/Libraries/TextInput/TextInput.web.js/react-web/Libraries/TextInput/TextInput.web.js 12:14-34
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\TextInput
@ ./
ERROR in .//react-web/Libraries/Animated/Animated.web.js/react-web/Libraries/Animated/Animated.web.js 14:27-69
Module not found: Error: Cannot resolve module 'react/lib/CSSPropertyOperations' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\Animated
@ ./
ERROR in .//react-web/Libraries/Utilties/LayoutMixin.js/react-web/Libraries/Utilties/LayoutMixin.js 10:14-34
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\Utilties
@ ./
ERROR in .//react-web/Libraries/Utilties/NativeMethodsMixin.web.js/react-web/Libraries/Utilties/NativeMethodsMixin.web.js 11:14-34
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\Utilties
@ ./
ERROR in .//react-web/Libraries/ListView/ScrollResponder.web.js/react-web/Libraries/ListView/ScrollResponder.web.js 14:14-34
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\ListView
@ ./
ERROR in .//react-web/Libraries/AppRegistry/renderApplication.web.js/react-web/Libraries/AppRegistry/renderApplication.web.js 10:14-34
Module not found: Error: Cannot resolve module 'react-dom' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\AppRegistry
@ ./
ERROR in .//react-web/Libraries/Utilties/setNativeProps.web.js/react-web/Libraries/Utilties/setNativeProps.web.js 8:26-68
Module not found: Error: Cannot resolve module 'react/lib/CSSPropertyOperations' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\Utilties
@ ./
ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 8:25-65
Module not found: Error: Cannot resolve module 'react/lib/EventPluginRegistry' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\PanResponder
@ ./
ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 9:26-67
Module not found: Error: Cannot resolve module 'react/lib/ResponderEventPlugin' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\PanResponder
@ ./
ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 10:20-55
Module not found: Error: Cannot resolve module 'react/lib/EventConstants' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\PanResponder
@ ./
ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 11:32-79
Module not found: Error: Cannot resolve module 'react/lib/ResponderTouchHistoryStore' in Z:\code\RNCode\RNBxvip\node_modules\react-web\Libraries\PanRes
ponder
@ ./
webpack: Failed to compile.
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"})
请问能支持最新RN版本0.36?
运行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;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.