mjohnston / react-native-webpack-server

Build React Native apps with Webpack
MIT License
933 stars 84 forks source link

npm run bundle failed #153

Closed laughmaker closed 8 years ago

laughmaker commented 8 years ago

hi, i have completely run success in developer mode, it's all fine. but when i bundle my project, i got a main.jsbundle file. but when i run this file, i got a error: Unhanded JS Exception: Requiring unknown module "Webpack/index.ios.js"

Webpack is my project name.

i check the main.jsbundle, i fund this code: require("InitializeJavaScriptAppEngine"),require("Webpack/index.ios.js");

how can i resolve error?

davidgruebl commented 8 years ago

ran into a similar problem, found

require("InitializeJavaScriptAppEngine"),require("react-native-webpack-server/_entry/index.ios.js");

in the main.jsbundle I monkey patched it by removing the require statement with

sed -i '' -e 's/,require(\"react-native-webpack-server\/_entry\/index.ios.js\")//g' ios/main.jsbundle

Yet, this is definitely not an appropriate fix - I am also curious on how to fix the actual issue.

philikon commented 8 years ago

What version of React Native? Can you also please paste your webpack.config.js? How are you running npm run bundle?

ghost commented 8 years ago

This is stale and should be closed.