[webpack-cli] TypeError: Cannot read properties of undefined (reading 'join')
yarn build:mobile
[!] Files already patched with the latest version. For details, run: ts-patch check
[webpack-cli] TypeError: Cannot read properties of undefined (reading 'join')
at PlatformSuffixPlugin.apply (/Users/loremru/Desktop/ns-test/node_modules/@nativescript/webpack/dist/plugins/PlatformSuffixPlugin.js:28:61)
at createCompiler (/Users/loremru/Desktop/ns-test/node_modules/webpack/lib/webpack.js:76:12)
at create (/Users/loremru/Desktop/ns-test/node_modules/webpack/lib/webpack.js:143:16)
at webpack (/Users/loremru/Desktop/ns-test/node_modules/webpack/lib/webpack.js:151:47)
at WebpackCLI.f [as webpack] (/Users/loremru/Desktop/ns-test/node_modules/webpack/lib/index.js:72:16)
at WebpackCLI.createCompiler (/Users/loremru/Desktop/ns-test/node_modules/webpack-cli/lib/webpack-cli.js:1789:29)
at async WebpackCLI.runWebpack (/Users/loremru/Desktop/ns-test/node_modules/webpack-cli/lib/webpack-cli.js:1890:20)
at async Command.
{
"name": "capacitor-app",
"version": "1.0.0",
"description": "An Amazing Capacitor App",
"main": "index.js",
"keywords": [
"capacitor",
"mobile"
],
"scripts": {
"start": "vite",
"build": "vite build",
"preview": "vite preview",
"build:nativescript": "node --experimental-import-meta-resolve node_modules/.bin/build-nativescript",
"build:mobile": "npm-run-all build build:nativescript",
"dev:nativescript": "dev-nativescript"
},
"dependencies": {
"@capacitor/android": "^5.5.1",
"@capacitor/camera": "latest",
"@capacitor/core": "latest",
"@capacitor/ios": "^5.5.1",
"@capacitor/splash-screen": "latest",
"@nativescript/capacitor": "^5.0.2",
"typescript": "^5.3.3"
},
"devDependencies": {
"@capacitor/cli": "latest",
"vite": "^2.9.13"
},
"author": "",
"license": "ISC"
}
Could someone provide an example template?
https://github.com/loremru/ns-cap-test
@NathanWalker, hey any thoughts? I have reproduction. Is this package still supported?
I was about to test NativeScript capacitor integration some time ago, but faced the same issue reported here.
This may be related to vite as we haven't tested with that yet. There may be a different template setup not using vite which would work in interim until we can look at it.