Error opening Ionic App

Asked

Viewed 252 times

0

I created a blank project in Ionic, and by having it rotated with the command "Ionic server", it presents the error below. Nothing was touched 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 { resolve(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

2 answers

1


Good night mate! Try to run npm install. Sometimes this error may be due to not installed dependencies.

If you still have no progress, run the commands below:

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

Supporting: https://github.com/ionic-team/ionic-cli/issues/3541

1

From what you wrote, it would be Ionic serves and not Ionic server If you have just misspelled here, try the following:

  • yarn remove ionic or npm uninstall -g ionic
  • npm cache clean if it doesn’t work, user flag --force
  • yarn global add ionic or npm install -g ionic

Browser other questions tagged

You are not signed in. Login or sign up in order to post.