Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #5576
Closed
Open
Issue created Oct 26, 2018 by Administrator@rootContributor

"Property env must be of type ProcessEnv" react-app.d.ts [typescript]

Created by: dfee

Is this a bug report?

yes.

Did you try recovering your dependencies?

no.

Which terms did you search for in User Guide?

typescript.

Environment

System: OS: macOS 10.14 CPU: x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz Binaries: Node: 10.9.0 - /usr/local/bin/node npm: 6.4.1 - /usr/local/bin/npm Browsers: Chrome: 70.0.3538.77 Firefox: 63.0 Safari: 12.0 npmPackages: @storybook/react: ^4.0.0-rc.3 => 4.0.0-rc.6 @types/react: ^16.4.18 => 16.4.18 @types/react-dom: ^16.0.9 => 16.0.9 react: ^16.5.2 => 16.6.0 react-dom: ^16.5.2 => 16.6.0 react-scripts: ^2.0.6-next.c662dfb0 => 2.0.6-next.c662dfb0 npmGlobalPackages: create-react-app: 2.0.4

Steps to Reproduce

  1. Use typescript with create-react-app.
  2. Inspect react-app.d.ts
  3. Observe the following error:
[ts] Subsequent property declarations must have the same type.  Property 'env' must be of type 'ProcessEnv', but here has type '{ [key: string]: string | undefined; NODE_ENV: "development" | "production" | "test"; PUBLIC_URL: string; }'.
(property) NodeJS.Process.env: ProcessEnv

Expected Behavior

I assume that env should extend ProcessEnv

Actual Behavior

[ts] Subsequent property declarations must have the same type.  Property 'env' must be of type 'ProcessEnv', but here has type '{ [key: string]: string | undefined; NODE_ENV: "development" | "production" | "test"; PUBLIC_URL: string; }'.
(property) NodeJS.Process.env: ProcessEnv
Assignee
Assign to
Time tracking