NativeScript / capacitor

NativeScript for Capacitor
https://capacitor.nativescript.org
38 stars 9 forks source link

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

Open loremru opened 11 months ago

loremru commented 11 months ago

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 commented 11 months ago

Could someone provide an example template?

loremru commented 11 months ago

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

loremru commented 11 months ago

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

waltercruz commented 11 months ago

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

NathanWalker commented 9 months ago

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.