Open jtoppine opened 4 years ago
Sometime this happens in windows machine, so you can manually change the name 😅
Sometime this happens in windows machine, so you can manually change the name 😅
Ok, thank you. However it seems to not execute actions after that error. If I read correctly, after renaming, androidjs init tries at least to update package.json:
pkg['name'] = this.androidjs.project.name;
pkg['app-name'] = this.androidjs.project.name;
pkg['package-name'] = this.androidjs.project.name;
pkg['scripts']['install'] = "adb install ./dist/app.apk";
pkg['scripts']['run'] = `adb shell am start -n com.android.js.${this.androidjs.project.name}/com.android.js.webview.MainActivity`;
pkg['scripts']['build:run'] = "androidjs build && npm run install && npm run run";
pkg['theme'] = {
"fullScreen": true,
"colorAccent": "@color/colorAccent",
"colorPrimary": "@color/colorPrimary",
"colorPrimaryDark": "@color/colorPrimaryDark"
};
jsonfile.writeFileSync(path.join(this.androidjs.project.paths.__dirname, this.androidjs.project.name, 'package.json'), pkg, { spaces: 4 })
Those actions won't get done because of the unhandled exception. I can do those changes manually too, I guess. Not sure if there is something else that should be done to create a working new project. Androidjs build fails on that newly created, manually renamed project though ("Error: total required at new ProgressBar ", a problem that seems to have it's own submission here on the issue tracker..)
Error: total required error occurs when your internet is slow or unavailable.
In order to overcome this error repeatedly try build
command until it start fetching sdk
Error: total required error occurs when your internet is slow or unavailable.
In order to overcome this error repeatedly try
build
command until it start fetching sdk
Yes, this seems to work as a workaround!
This is still a problem and it has nothing to do with the internet connection. If I run androidjs init on Ubuntu, on the same machine and same internet connection, it works fine on the first try. On Windows it doesn't work even on a datacenter connection.
Facing the same issue ...
This bug is gonna fix in the new release, which you'll get very soon ; )
Hey, we have release new version of androidjs-builder@2.1.4
, which may solve all the existing problem.
So you can upgrade to the latest version 2.1.4
and enjoy.
Follow these instruction to upgrade androidjs-builder
to latest
$ npm uninstall -g androidjs-builder
$ npm install -g androidjs-builder@2.1.4
Feel free to ask in case of any problem ; )
Hi Chhekur,
Getting the following error:
loadDep:yargs → resolveWi ▌ ╢██████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 loadDep:fsevents → 304 ▐ ╢████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ npm ERR! Linux 4.4.0-18362-Microsoft npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "androidjs-builder@2.1.4" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1 npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3) npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22) npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12) npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7 npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50 npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12 npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5) npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7) npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20) npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50 npm ERR! typeerror This is an error with npm itself. Please report this error at: npm ERR! typeerror http://github.com/npm/npm/issues
Regards, Amit
Hi Chhekur,
Getting the following error:
loadDep:yargs → resolveWi ▌ ╢██████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142 loadDep:fsevents → 304 ▐ ╢████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ npm ERR! Linux 4.4.0-18362-Microsoft npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "androidjs-builder@2.1.4" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1 npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3) npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22) npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12) npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7 npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50 npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12 npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5) npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7) npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20) npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50 npm ERR! typeerror This is an error with npm itself. Please report this error at: npm ERR! typeerror http://github.com/npm/npm/issues
Regards, Amit
Installing the latest NPM solved the issue ...
npm install -g npm@latest
failing at build now:
androidjs build
copying assets ... updating app name... updating theme ... Using SDK: 2.0.4 Building Apk ... events.js:183 throw er; // Unhandled 'error' event ^
Error: spawn java ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! firstApp@1.0.0 build: androidjs build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the firstApp@1.0.0 build script.
failing at build now:
androidjs build
copying assets ... updating app name... updating theme ... Using SDK: 2.0.4 Building Apk ... events.js:183 throw er; // Unhandled 'error' event ^
Error: spawn java ENOENT at _errnoException (util.js:1022:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19) at onErrorNT (internal/child_process.js:372:16) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! firstApp@1.0.0 build:
androidjs build
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the firstApp@1.0.0 build script.
Ok.. .solved it apt install default-jre
Androidjs init fails to create a project. It stops to a permission error when renaming vue-js-example, and is unable to handle the error.
Tried this with two different Win10 machines, both administrator and regular CMD, updated node, updated npm, updated all global packages, cleared npm caches, tried to set very permissive folder permissions on windows, disabled windows defender, disabled dropbox, tried this outside dropbox folder, and many other things I can't remember anymore.
To Reproduce Steps to reproduce the behavior:
Desktop (please complete the following information):