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
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"
]
}
}