Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

NODE_PATH set in .env doesn't work #119

@constfun

Description

@constfun

Fresh app. Then:

echo NODE_PATH=src > .env

And change src/index.tsx

import App from './App';

to

import App from 'App';

Results in:

./src/index.tsx
(3,17): error TS2307: Cannot find module 'App'.

This is one way to get absolute imports with plain create-react-app, I tested the same process with that and it builds fine.

The .env file itself is definitely loaded, since I can set PORT, for example.

Related:
#98
facebook/create-react-app#741
facebook/create-react-app#1712
(possibly) facebook/create-react-app#2230

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy