Coder Social home page Coder Social logo

Comments (6)

zamotany avatar zamotany commented on May 23, 2024
error Option "--webpackConfig" is missing. Run CLI with --verbose flag for more details.
Error: Option "--webpackConfig" is missing

This is probably a bug on our end. Can you let me know which version of @react-native-community/cli are you using?

Issues starting the bundler

Error 1

The Webpack config needs to know for which platform to generate the bundle and there are multiple ways to pass that infor to webpack.config.js. In the default template it's by process.env.PLATFORM so you should run it by PLATFORM=<platform> webpack-cli -c webpack.config.js in your case. The docs doesn't mention that, since I don't know how people are passing the platform - it can be hardcoded or passed as a command line option, it can be red from .env file and so on.

Error 2

It should have been npx react-native webpack-start and npx react-native webpack-bundle in the comment, which is a bug on our end.

Bundler stuck at 10%

Not sure why the issue is happening. I suspect Webpack has a problem on some files. It's difficult to debug what's the root cause so I recommend to create a repro project where the same issue can be observed.

Android build fails due to kotlin error in repack

Likely caused due to newer Kotlin version. ChunkManagerModule.kt must be adjusted to make it pass.

repack does not start automatally on ios/android build

Running Metro is hardcoded into the React Native CLI, so there's little we can do in that regard. The only option I see for the time being is to create custom Node.js script or bash script to run Re.Pack in separate terminal window and then run react-native start with --noPackager option.

from repack.

dingziqi avatar dingziqi commented on May 23, 2024

error Option "--webpackConfig" is missing. Run CLI with --verbose flag for more details.
Error: Option "--webpackConfig" is missing

same error with @react-native-community/[email protected]

from repack.

simarmol avatar simarmol commented on May 23, 2024

I'm on 5.0.1-alpha.2 apparently.

error Option "--webpackConfig" is missing. Run CLI with --verbose flag for more details.
Error: Option "--webpackConfig" is missing

This is probably a bug on our end. Can you let me know which version of @react-native-community/cli are you using?

I'm on 5.0.1-alpha.2 apparently. Not sure why.

from repack.

MateWW avatar MateWW commented on May 23, 2024

@dingziqi @scmarmol I've prepared a fresh project with RePack and it works for me with both CLI versions.
Could you please check it on your side?

https://github.com/MateWW/Repack-reproduction

from repack.

simarmol avatar simarmol commented on May 23, 2024

@dingziqi @scmarmol I've prepared a fresh project with RePack and it works for me with both CLI versions.
Could you please check it on your side?

https://github.com/MateWW/Repack-reproduction

Hm, also working for me. I guess something is wrong on my end, but I have yet to figure out what.

from repack.

zamotany avatar zamotany commented on May 23, 2024

The error:

$ webpack-cli -c webpack.config.js
[webpack-cli] Failed to load '/reporoot/rnApp/webpack.config.js' config
[webpack-cli] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

got fixed in #80

The error:

> Task :callstack_repack:compileDebugKotlin FAILED
/node_modules/@callstack/repack/android/src/main/java/com/callstack/nativepack/ChunkManagerModule.kt: (89, 49): Type mismatch: inferred type is String? but String was expected

FAILURE: Build failed with an exception.

should no longer be an issue as it was addressed in #75

If Webpack is stuck at 10% it's likely configuration error on your end. For troubleshooting I suggest to run react-native webpack-bundle --dev false --platform <platform> --entry-file ./index.js --bundle-output ./main.jsbundle and see if that one passes. If it's stuck as well, it's configuration issue, if not please open a separate issue.

from repack.

Related Issues (20)

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.