Unable to build module-federation example
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, node.js, webpack
- Domain
- build-system, mobile-dev
Research direction
Start with app1/webpack.config.mjs and compare its production command with the working host and app2 configurations. Reproduce after yarn run bootstrap, then trace the reported AssetsCopyProcessor.enqueueChunk path in @callstack/repack. Done means the same production command completes successfully for both app1 and module1 without the undefined-path error.
Written by the indexing model from the issue text.
Description
Environment
System
platform darwin
arch arm64
cpu 10 cores Apple M1 Pro
Node.js v18.9.1
yarn v3.2.1
Description
Unable to build module-federation example for production.
I have been able to run the module-federation example on dev but I have been trying to change the implementation to an actual production level code. So I started to build production bundles for each of the modules.
I have been able to produce release bundles for host and app2 MFs using the following command:
STANDALONE=1 webpack -c webpack.config.mjs --env platform=ios --env mode=production
But when trying to run the same command on app1 and module1 MFs, I am getting the following error:
[webpack-cli] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
Reproducible Demo
git clone https://github.com/callstack/repack-examples
cd repack-examples
yarn run bootstrap
cd app1
npx STANDALONE=1 webpack -c webpack.config.mjs --env platform=ios --env mode=production
Output
[webpack-cli] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at new NodeError (internal/errors.js:322:7)
at validateString (internal/validators.js:124:11)
at Object.join (path.js:1148:7)
at AssetsCopyProcessor.enqueueChunk (/Users/parichitkotawala/Development/RN/repack-examples/module-federation/module1/node_modules/@callstack/repack/dist/webpack/plugins/utils/AssetsCopyProcessor.js:53:70)
at /Users/parichitkotawala/Development/RN/repack-examples/module-federation/module1/node_modules/@callstack/repack/dist/webpack/plugins/OutputPlugin.js:225:55
at Hook.eval [as callAsync] (eval at create (/Users/parichitkotawala/Development/RN/repack-examples/module-federation/module1/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:8:17)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/parichitkotawala/Development/RN/repack-examples/module-federation/module1/node_modules/tapable/lib/Hook.js:18:14)
at /Users/parichitkotawala/Development/RN/repack-examples/module-federation/module1/node_modules/webpack/lib/Compiler.js:882:27
at /Users/parichitkotawala/Development/RN/repack-examples/module-federation/module1/node_modules/neo-async/async.js:2818:7
at done (/Users/parichitkotawala/Development/RN/repack-examples/module-federation/module1/node_modules/neo-async/async.js:3522:9)
at alreadyWritten (/Users/parichitkotawala/Development/RN/repack-examples/module-federation/module1/node_modules/webpack/lib/Compiler.js:714:8)
at /Users/parichitkotawala/Development/RN/repack-examples/module-federation/module1/node_modules/webpack/lib/Compiler.js:802:19
at /Users/parichitkotawala/Development/RN/repack-examples/module-federation/module1/node_modules/graceful-fs/graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:71:3) {
code: 'ERR_INVALID_ARG_TYPE'
}
- Dominant language
- Java
- Stars
- 69
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstack/repack-examples
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
callstack/repack-examples#13 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
callstack/repack-examples#12 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
callstack/repack-examples#11 · 1 comment · 1 reaction ·
-
question
Difficulty 3/5 1-2 days Newbie friendliness 25/100
callstack/repack-examples#10 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
All issues in callstack/repack-examples
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elastic/gradle-plugins#157 ·
-
enhancement Tools
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
apache/rocketmq-dashboard#5008 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
DETECT_PARAMETER_NAMES=false silently disables @ConstructorProperties-based Creator detection too Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
FasterXML/jackson-databind#6229 ·