capacitor icon indicating copy to clipboard operation
capacitor copied to clipboard

[webpack-cli] TypeError: Cannot read properties of undefined (reading 'join')

Open loremru opened this issue 2 years ago • 6 comments

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. (/Users/loremru/Desktop/ns-test/node_modules/webpack-cli/lib/webpack-cli.js:912:21) at async Promise.all (index 1) at async Command. (/Users/loremru/Desktop/ns-test/node_modules/webpack-cli/lib/webpack-cli.js:1372:13)

{
  "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"
}
image

loremru avatar Dec 14 '23 11:12 loremru

Could someone provide an example template?

loremru avatar Dec 14 '23 11:12 loremru

https://github.com/loremru/ns-cap-test

loremru avatar Dec 14 '23 13:12 loremru

@NathanWalker, hey any thoughts? I have reproduction. Is this package still supported?

loremru avatar Dec 18 '23 08:12 loremru

I was about to test NativeScript capacitor integration some time ago, but faced the same issue reported here.

waltercruz avatar Dec 18 '23 12:12 waltercruz

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.

NathanWalker avatar Feb 05 '24 19:02 NathanWalker