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

Can't run a simple Ionic app after generating it with yo jhipster-ionic #51

Closed
CRivasGomez opened this issue Aug 29, 2018 · 3 comments
Closed

Comments

@CRivasGomez
Copy link

Hi! 👋

I always encounter this problem while running a fresh new generated Ionic app.

Overview of the issue - if an error is being thrown a stack trace helps

After generating my Ionic app as specified in the README.md it can't run it without error.
It says:

Typescript Error
Subsequent variable declarations must have the same type. Variable 'process' must be of type '{ env: { [key: string]: string; }; }', but here has type 'Process'.
node_modules/@types/node/index.d.ts

Screenshot

screen shot 2018-08-29 at 14 20 52

My environment

Ionic Framework: 3.9.2
Ionic App Scripts: 3.1.9
Angular Core: 5.2.10
Angular Compiler CLI: 5.2.10
Node: 8.11.3
OS Platform: macOS High Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

jhipster info

##### **JHipster Version(s)**

[email protected] /Users/crivasgomez/jhipster/myapp/ionic4j
├── [email protected]
└─┬ [email protected]
└── [email protected] deduped


cat: no such file or directory: .yo-rc.json

##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**


<details>
<summary>.yo-rc.json file</summary>
<pre>

</pre>
</details>


##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**

<details>
<summary>JDL entity definitions</summary>

<pre>




</pre>
</details>


##### **Environment and Tools**

java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

git version 2.15.2 (Apple Git-101.1)

node: v8.11.3

npm: 6.4.0

gulp:
[14:23:14] CLI version 2.0.1

yeoman: 2.0.5

yarn: 1.7.0

Docker version 18.06.0-ce, build 0ffa825

docker-compose version 1.22.0, build f46880f

Congratulations, JHipster execution is complete!

Motivation for or Use Case - explain why this is a bug for you

I can't generate runnable Ionic apps from JHipster generated runnable apps.

Reproduce the error - an unambiguous set of steps to reproduce the error. If you have a JavaScript error, maybe you can provide a live example with JSFiddle?

mkdir -p myapp/backend
cd myapp/backend
jhipster
(...)
cd ..
yo jhipster-ionic
(...)
cd ionic4j
ionic serve

Related issues - has a similar issue been reported before?

No.

Suggest a Fix - if you can't fix the bug yourself, perhaps you can point to what might be causing the problem (line of code or commit)

The screenshot shows a suspicious part of code inside node_modules/@types/node/index.d.ts.

JHipster Version(s) - is it a regression?
4.14.5

JHipster configuration, a .yo-rc.json file generated in the root folder - this will help us to replicate the scenario, you can remove the rememberMe key.

{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.mycompany.myapp",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "5.1.0",
    "applicationType": "monolith",
    "baseName": "backend",
    "packageName": "com.mycompany.myapp",
    "packageFolder": "com/mycompany/myapp",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSwaggerCodegen": false,
    "jwtSecretKey": "******************************************",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en"
    ]
  }
}
@mraible
Copy link
Collaborator

mraible commented Aug 29, 2018

Possibly related: ionic-team/ionic-cli#3541

@mraible
Copy link
Collaborator

mraible commented Aug 29, 2018

@CRivasGomez Can you try removing src/declarations.d.ts from your project as suggested and see if that fixes it?

@CRivasGomez
Copy link
Author

CRivasGomez commented Aug 30, 2018

Hey!

I resolved it by restarting my machine. Now is working as is supposed to do.

This is very strange because I have been dealing with this problem for 2 days before opening this issue and in that period of time I have rebooted my machine at least 2 times and tried again to generate all the projects multiple times.

I'am trying to reproduce the error but I can't.

Anyways, thanks for your time @mraible 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants