environment-variablesnetlifynetlify-function

set NODE_PATH in netlify dev - absolute imports


Hi how can I set NODE_PATH like in .env file for a netlify dev. Because I got an errors

Module not found: Can't resolve 'index.css' in '/mnt/y/projects/instagram-story-saver/src'

App is built on Create React App


Solution

  • .env file does not work, but newer method does work:

    in jsconfig.json:

    {
      "compilerOptions": {
        "baseUrl": "src"
      },
      "include": ["src"]
    }