motdotla / dotenv-expand

Variable expansion for dotenv. Expand variables already on your machine for use in your .env file.
https://dotenvx.com
BSD 2-Clause "Simplified" License
955 stars 95 forks source link

Package subpath './lib/env-options' is not defined by "exports" #82

Closed fernandolguevara closed 9 months ago

fernandolguevara commented 2 years ago

@motdotla @lnasc256

node:internal/modules/cjs/loader:499ig:load:flatten Completed in 1ms
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/env-options' is not defined by "exports" in /Users/xxx/projects/xxx/node_modules/.pnpm/node_modules/dotenv/package.json
    at new NodeError (node:internal/errors:387:5)

dotenv doesn't export env-options, check the exports options

{
  "name": "dotenv",
  "version": "10.0.0",
  "description": "Loads environment variables from .env file",
  "main": "lib/main.js",
  "exports": {
    ".": "./lib/main.js",
    "./config": "./config.js",
    "./config.js": "./config.js",
    "./package.json": "./package.json"
  },
  "types": "types/index.d.ts",
  "scripts": {
    "flow": "flow",
    "dtslint": "dtslint types",
    "lint": "standard",
    "postlint": "standard-markdown",
    "pretest": "npm run lint && npm run dtslint",
    "test": "tap tests/*.js --100",
    "prerelease": "npm test",
    "release": "standard-version"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/motdotla/dotenv.git"
  },
  "keywords": [
    "dotenv",
    "env",
    ".env",
    "environment",
    "variables",
    "config",
    "settings"
  ],
  "readmeFilename": "README.md",
  "license": "BSD-2-Clause",
  "devDependencies": {
    "decache": "^4.5.1",
    "dtslint": "^0.9.8",
    "flow-bin": "^0.109.0",
    "sinon": "^7.5.0",
    "standard": "^13.1.0",
    "standard-markdown": "^5.1.0",
    "standard-version": "^7.0.0",
    "tap": "^14.7.0"
  },
  "dependencies": {},
  "engines": {
    "node": ">=10"
  },
  "standard": {
    "ignore": [
      "flow-typed/"
    ]
  }
}
motdotla commented 2 years ago

Upgrade to the latest dotenv and you should be good here now.

fernandolguevara commented 2 years ago

@motdotla fixed!