Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While using Amplify DataStore, Android Studio cannot find nodejs installed in the system. #3745

Closed
Jay2113 opened this issue Mar 23, 2020 · 13 comments
Assignees
Labels
bug Something isn't working windows Issues tied to running the CLI on Windows

Comments

@Jay2113
Copy link
Contributor

Jay2113 commented Mar 23, 2020

Describe the bug
I have created an Android App and I am trying to integrate Amplify DataStore into it. In the process, while trying to run the modelgen task from Android Studio I am observing an error saying Nodejs is not found.

Amplify CLI Version
4.16.1

To Reproduce
Create a basic Android App and try to integrate Amplify DataStore. Reference: https://aws-amplify.github.io/docs/android/datastore

Expected behavior
Modelgen task should go through and create model files successfully.

Screenshots
Here are the Build logs:
Executing tasks: [clean, :app:assembleDebug] in project C:\Users\User\AndroidStudioProjects\AltorRide

Gradle Daemon started in 3 s 742 ms

Configure project :
Node is not installed. Visit https://nodejs.org/en/download/ to install it

Task :clean UP-TO-DATE
Task :app:clean
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:compileDebugAidl NO-SOURCE
Task :app:generateDebugBuildConfig
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:mainApkListPersistenceDebug
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:injectCrashlyticsMappingFileIdDebug

Task :app:processDebugGoogleServices
Parsing json file: C:\Users\User\AndroidStudioProjects\AltorRide\app\google-services.json

Task :app:javaPreCompileDebug
Task :app:mergeDebugResources
Task :app:createDebugCompatibleScreenManifests
Task :app:extractDeepLinksDebug

Task :app:processDebugManifest
C:\Users\User\AndroidStudioProjects\AltorRide\app\src\main\AndroidManifest.xml:24:9-31:50 Warning:
activity#com.google.firebase.auth.internal.FederatedSignInActivity@android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present

Task :app:processDebugResources

Task :app:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Task :app:compileDebugSources
Task :app:mergeDebugShaders
Task :app:compileDebugShaders
Task :app:generateDebugAssets
Task :app:mergeDebugAssets
Task :app:processDebugJavaRes NO-SOURCE
Task :app:checkDebugDuplicateClasses
Task :app:mergeDebugJavaResource
Task :app:dexBuilderDebug
Task :app:desugarDebugFileDependencies
Task :app:mergeDebugJniLibFolders
Task :app:validateSigningDebug
Task :app:mergeDebugNativeLibs
Task :app:stripDebugDebugSymbols
Task :app:multiDexListDebug
Task :app:mergeDexDebug
Task :app:packageDebug
Task :app:assembleDebug

BUILD SUCCESSFUL in 5m 49s
28 actionable tasks: 27 executed, 1 up-to-date

Here are the modelgen logs:
modelgen logs.txt

Desktop (please complete the following information):

  • OS: Windows 7 Ultimate SP1
  • Node Version: 12.16.1
  • NPM Version: 6.13.4
@attilah attilah added pending-triage Issue is pending triage windows Issues tied to running the CLI on Windows code-gen labels Mar 24, 2020
@alan-cooney
Copy link

Did you ever resolve this?

@nikhname
Copy link
Contributor

nikhname commented Mar 30, 2020

@Jay2113 Which version of amplify-tools-gradle-plugin are you using?
I wasn't able to reproduce this with version 0.2.1 of the plugin

@nikhname nikhname added the pending-response Issue is pending response from the issue author label Mar 30, 2020
@nikhname nikhname added this to Nikhil in Issue tracking Mar 30, 2020
@Jay2113
Copy link
Contributor Author

Jay2113 commented Apr 1, 2020

Hi @alan-cooney
Can you please confirm the version of amplify-tools-gradle-plugin that you are using?

@zilonkaj
Copy link

zilonkaj commented Apr 2, 2020

I am also having this issue with version 0.2.1 of the gradle plugin. This is on the latest Android Studio on Windows 10.

@nikhname
Copy link
Contributor

nikhname commented Apr 3, 2020

Hi @zilonkaj, just to clarify you are seeing the node is not installed error message? What is the output when you enter which node ?

@nikhname nikhname added bug Something isn't working and removed pending-triage Issue is pending triage labels Apr 3, 2020
@nikhname
Copy link
Contributor

nikhname commented Apr 3, 2020

This seems to be a bug on windows. As a workaround, you can run
npx amplify-app --platform android
to set up the amplify project and then
amplify codegen models
to generate models

@sayantapadar
Copy link

@nikhname I used Ubuntu 18.04.4 LTS to build the project, and everything worked fine. So yes it is a Windows bug it seems.

@kaustavghosh06 kaustavghosh06 removed the pending-response Issue is pending response from the issue author label Apr 24, 2020
@nikhname
Copy link
Contributor

Closed by aws-amplify/amplify-android#505

@ParryPatel021
Copy link

@sayantapadar I am using the same system as your's but I am having this issue.
It occurs when I try to run my Android Project.
Do you have any idea?
Please share some work around

@sayantapadar
Copy link

sayantapadar commented Jun 27, 2020

@ParryPatel021 I'm afraid I was unable to find a solution in my Windows 7 SP1 system, even after trying all possible remedies. I moved to a linux based system - in my case Ubuntu 18.04. Over there, simply following the getting started doc worked perfectly for me.

@ParryPatel021
Copy link

Okay @sayantapadar Thank for the reply, I will again go through the Getting started doc from the begin

@jamesonwilliams
Copy link
Contributor

jamesonwilliams commented Jul 1, 2020

Looks like this issue #3745 was duplicated in aws-amplify/amplify-android#531, and in aws-amplify/amplify-android#536. Let's track aws-amplify/amplify-android#536.

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working windows Issues tied to running the CLI on Windows
Projects
No open projects
Development

No branches or pull requests

9 participants