Skip to content

Cannot use "Api" as folder name when require modules #5151

@liangfenxiaodao

Description

@liangfenxiaodao

I have a viewModel which need to do http request and an endpoint configured in Api/endpoint.js

If I use var api = require("../Api/endpoint.js"), then I will get

Unable to resolve module.. error.

But if I rename the "Api" folder to "Endpoint" or something else, the error disappears.

I'm working on iOS project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions