-
Notifications
You must be signed in to change notification settings - Fork 660
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
Dependency issue? Subsequent variable declarations must have the same type. #3541
Comments
Additional info: If I do the same flow, but use the It was working earlier this morning with Although I shouldn't need to, I ran |
I worked.
|
I didn't notice the version was old, sorry about that! Unfortunately, I updated to node 8.11.4 and am getting the same error. System Info:
With the same error:
|
Sorry. I missed Steps to Reproduce. I don't work too. and maybe, this is feature Issue. #3300 |
Interesting. I will try the global install instead of using |
Instead of using an npm run script, I decided to try installing
This worked! Two thoughts:
Edit: accidentally hit the enter key. |
* feat(environments): add process declaration * remove @types packages after building starters quick hack because they interfere with starters build see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types * update app-scripts to 3.2.0
I got this issue stable reproducible: npm install @ionic/lab brings this error. `$ ionic info Ionic: ionic (Ionic CLI) : 4.1.1 (/Users/<username>/.npm-packages/lib/node_modules/ionic) System: NodeJS : v8.11.3 (/usr/local/bin/node)
|
Same issue, I'm getting the message
When running the command
Output from Ionic Info
|
It happens when Ionic 4 project created with "classic" type ionic-angular and then @ionic/lab installed. ionic-angular does not require @ionic/lab to be installed, lab can be accessed via http://localhost:8100/ionic-lab it does not require another "lab" process to be running. So, if using type=angular, install @ionic/lab it will work fine |
I get the same error when doing Ionic info: ✔ Gathering environment info - done!
Ionic:
ionic (Ionic CLI) : 4.1.1
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0
System:
NodeJS : v8.11.4 (/usr/local/bin/node)
npm : 6.4.0
OS : macOS High Sierra package.json: "dependencies": {
"@angular/animations": "5.2.11",
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/compiler-cli": "5.2.11",
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@capacitor/cli": "^1.0.0-beta.7",
"@capacitor/core": "^1.0.0-beta.7",
"@capacitor/ios": "^1.0.0-beta.7",
"@ionic-native/core": "~4.11.0",
"@ionic-native/splash-screen": "~4.11.0",
"@ionic-native/status-bar": "~4.11.0",
"@ionic/pro": "2.0.3",
"@ionic/storage": "2.1.3",
"ionic": "^4.1.1",
"ionic-angular": "^3.9.2",
"ionicons": "3.0.0",
"pdf-viewer": "file:../Plugins/pdf-viewer",
"rxjs": "5.5.11",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "3.2.0",
"typescript": "~2.6.2"
} Edit: My issue seems to be related to Capacitor. If I do: ionic start myApp blank
cd myApp
ionic serve It works. But then I install capacitor: npm install --save @capacitor/core @capacitor/cli
ionic serve It breaks with the error:
|
The issue is when |
I removed If you get the The possible solutions are:
Thanks for the bug report and investigating everyone! 🎉 cc @nphyatt |
I added the |
Adding |
Here, I can also confirm that adding |
I tried adding "types": [] to compilerOptions and I'm still getting this error which is odd. Typescript Error No matter what I do it is always conflicting with the var process from @types/node. I tried removing the package but I have too many things in my app that require @types/node. Is there anything else I can do? |
@saibotsivad can you post your tsconfig so I can compare? |
Sure thing: link That's the default |
I was with the same error, adding |
If anybody else (like me) fell here because of a project using |
^ perfect explanation thank you! |
3.1.9: * fix(2889): fix build error with --prod * fix(serve): start listening when watch is ready * fix(live-server): update android platform path (ionic-team#1407) * docs(changelog): 3.1.9 3.1.10: * Update node-sass dependency (ionic-team#1435) Updating node-sass dependency from 4.7.2 to 4.9.0 to make it works with node 10 on windows (build fail with ionic start) * chore(package): bump deps (ionic-team#1421) * chore(deps): no package lock * chore(changelog): 3.1.10 3.1.11: * fix(serve): fix EADDRINUSE issue with dev logger server fixes ionic-team/ionic-cli#3368 fixes ionic-team/ionic-cli#1678 fixes ionic-team/ionic-cli#1830 fixes ionic-team/ionic-cli#1721 fixes ionic-team/ionic-cli#1866 fixes ionic-team/ionic-cli#1808 fixes ionic-team/ionic-cli#3022 * docs(changelog): 3.1.11 changes 3.2.0: * feat(environments): configuration via process.env.VAR replacement (ionic-team#1471) * fix(sass): remove PostCSS warning (ionic-team#1364) This removes following warning: Remove warning: Without `from` option PostCSS could generate wrong source map or do not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning `from: the input file name (most runners set it automatically).` Source: https://github.com/postcss/postcss Fixes ionic-team#1359 #13763 ionic-team#1359 ionic-team/ionic-framework#13763 * fix(serve): use wss protocol for secure websocket when page is using https (ionic-team#1358) * docs(changelog): 3.2.0 3.2.1: * docs(readme): add note about existing declaration addresses ionic-team/ionic-cli#3541 * chore(deps): update webpack to 3.12.0 (ionic-team#1477) * chore(deps): bump node-sass to 4.9.3 to fix security warnings (ionic-team#1483) * chore(deps): bump node-sass to 4.10.0 to fix security warnings (ionic-team#1493) * docs(changelog): 3.2.1
I can confirm |
This declaration is only necessary if using the new environments for `@ionic/app-scripts`: https://github.com/ionic-team/ionic-app-scripts#environments The `process` declaration can be added by the dev whenever and however deemed necessary. fixes ionic-team/ionic-cli#3541
Description:
After following the "Getting Started" guide for setting up my first app with the sidemenu template, I get a typescript error:
Steps to Reproduce:
Following the steps as listed in the CLI getting started section, except using
npx
:I then edit the
package.json
to add a run script:Output:
The following logs are produced:
My
ionic info
:Other Information:
I am not yet familier with TypeScript, so I went digging and found that @types/node is at 10.9.1 but then
npm ls @types/node
shows what's being used in the ionic project is 6.0.116, which seems really old.I couldn't quite track down the dependency tree to see where those would get updated, so maybe this outdated dependency is a documented issue already?
Still, having the "Getting Started" demo app break is probably not great 😆
The text was updated successfully, but these errors were encountered: