android-js / androidjs

Platform to build android app using node js
MIT License
462 stars 109 forks source link

Failed to create assets Error: EEXIST: file already exists, mkdir #290

Open bjshumway opened 1 year ago

bjshumway commented 1 year ago

I have node install on windows

This is my first time doing this so bear with me.

I'm following the tutorial at https://android-js.github.io/docs/getting_started.html

When I get to the step to run "android b -f".... I get this output and error... see below

androidjs b -f --release= false Downloading: https://github.com/android-js/androidjs-sdk/archive/master.zip failed to download, retrying.. re-trying failed to download, retrying.. re-trying failed to download, retrying.. re-trying failed to download Failed to create assets Error: EEXIST: file already exists, mkdir 'C:\Users\BenjaminShumway\.androidjs\cache\androidjs-sdk\assets\myapp' at Object.mkdirSync (node:fs:1395:3) at Webview.updateFiles (C:\Users\BenjaminShumway\AppData\Roaming\npm\node_modules\androidjs-builder\modules\webview.js:320:20) at C:\Users\BenjaminShumway\AppData\Roaming\npm\node_modules\androidjs-builder\modules\webview.js:511:26 at Request. (C:\Users\BenjaminShumway\AppData\Roaming\npm\node_modules\androidjs-builder\modules\webview.js:663:17) at Request.emit (node:events:525:35) at IncomingMessage. (C:\Users\BenjaminShumway\AppData\Roaming\npm\node_modules\androidjs-builder\node_modules\request\request.js:1076:12) at Object.onceWrapper (node:events:627:28) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1359:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4075, syscall: 'mkdir', code: 'EEXIST', path: 'C:\Users\BenjaminShumway\.androidjs\cache\androidjs-sdk\assets\myapp' }

bjshumway commented 1 year ago

My package looks like this:

{ "name": "AI-Story-Battles", "app-name": "AI Story Battles", "package-name": "aistorybattles", "icon": "./assets/icon/icon.png", "project-type": "webview", "permission": [ "android.permission.INTERNET", "android.permission.WRITE_EXTERNAL_STORAGE", "android.permission.READ_EXTERNAL_STORAGE" ], "version": "1.0.0", "dist-path": "./dist", "description": "", "main": "main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "androidjs": "^1.0.12", "androidjs-builder": "^2.3.2" } }

bjshumway commented 1 year ago

see how the name is "AI Story Battles"... its NOT "myapp",.... but the error message is saying that a folder called "myapp" already exists