Error opening Ionic App

0

I created a blank project on Ionic, and by running it with the "ionic server" command, it displays the error below. Nothing has been tweaked in the original design.

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 interface NodeRequire extends NodeRequireFunction {     solve (id: string): string;     cache: any; Ionic Framework: 3.9.2 Ionic App Scripts: 3.2.0 Angular Core: 5.2.11 Angular Compiler CLI: 5.2.11 Node: 10.8.0 OS Platform: Linux 4.15 Navigator Platform: Linux x86_64 User Agent: Mozilla / 5.0 (X11; Ubuntu; Linux x86_64; rv: 61.0) Gecko / 20100101 Firefox / 61.0

    
asked by anonymous 28.08.2018 / 04:01

2 answers

1

Good evening mate! Try to execute npm install . Sometimes this error can be due to uninstalled dependencies.

If you still do not have progress, run the following commands:

# desinstalar ionic na pasta do projeto
npm uninstall --save ionic
# instalando globalmente
npm install -g ionic
# run
ionic serve -c

Support: link

    
28.08.2018 / 04:48
1

For what you wrote, it would ionic serve and not ionic server If you just wrote wrong here, try the following:

  • yarn remove ionic or npm uninstall -g ionic
  • npm cache clean if it does not work, user a flag - force
  • yarn global add ionic or npm install -g ionic
28.08.2018 / 13:59