natchiketa / angular-cli-envvars

Example project for my article "Angular CLI and OS Environment Variables"
55 stars 12 forks source link

Cannot find name 'process'. Do you need to install type definitions for node? #6

Closed philip13 closed 5 years ago

philip13 commented 5 years ago

In install previously npm install --save @types/node but it show me went run ng serve -c dev

ERROR in src/set-env.ts(29,14): error TS2580: Cannot find name 'process'. 
Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
src/set-env.ts(30,14): error TS2580: Cannot find name 'process'. 
Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
a-vizuet commented 5 years ago

Did you add "node" into types field in the tsconfig/tsconfig.app file?

"types": ["node"]

philip13 commented 5 years ago

Did you add "node" into types field in the tsconfig/tsconfig.app file?

"types": ["node"]

I added into my package.json

"devDependencies": {
    ...
    "@types/node": "~10.12.0",
...

Now is fixed, Thank you !

kwhjvdkamp commented 4 years ago

...or take care of typo's in, for instance, as I noticed, in my 'upload-batch- Githubissues.

  • Githubissues is a development platform for aggregating issues.