Skip to content
This repository was archived by the owner on Jul 8, 2020. It is now read-only.
This repository was archived by the owner on Jul 8, 2020. It is now read-only.

The package at "node_modules/react-native-dotenv/index.js" attempted to import the Node standard library module "path" #67

@idandagan1

Description

@idandagan1

While building the js bundle I get:

The package at "node_modules/react-native-dotenv/index.js" attempted to import the Node standard library module "path". It failed because React Native does not include the Node standard library. Read more at https://docs.expo.io/versions/latest/introduction/faq/#can-i-use-nodejs-packages-with-expo

image

My versions:
node: 10.16
npm: 6.9
expo: 32.0.6
react-native-dotenv: 0.2.0

I've tried to remove node_modules, cleared cache, restarting the computer, install again.
I have the same problem as the stackoverflow question.

This is my babel.config.js:

module.exports = function config(api) {
  api.cache(true);

  return {
    presets: ['babel-preset-expo', 'module:metro-react-native-babel-preset', 'module:react-native-dotenv'],
    plugins: [
      [
        '@babel/plugin-proposal-decorators',
        {
          legacy: true,
        },
      ],
    ],
  };
};

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