Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Generated code imports using \ instead of / #10

Closed
ivopr opened this issue Sep 15, 2021 · 4 comments
Closed

Generated code imports using \ instead of / #10

ivopr opened this issue Sep 15, 2021 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ivopr
Copy link

ivopr commented Sep 15, 2021

Example of generated code:

import {Authentication} from '..\..\authentication\entities\authentication.entity'


export class Account {
  email: string ;
name: string ;
authentication?: Authentication  | null;
authenticationId: string  | null;
createdAt: Date ;
updatedAt: Date ;
}

On windows 11, node lts

@benkroeger
Copy link
Member

benkroeger commented Sep 21, 2021

this is probably due to building on windows and the generator using path.sep and path.relative() from NodeJS core.

Others have hit this barrier before - and there is even a package to convert windows paths

@benkroeger benkroeger added bug Something isn't working help wanted Extra attention is needed labels Sep 21, 2021
@benkroeger
Copy link
Member

can you provide a PR to wrap import paths with slash

@webdagger
Copy link
Contributor

can you provide a PR to wrap import paths with slash

#11 Does this fix it on windows?

@benkroeger
Copy link
Member

fixed in 1.4.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Development

No branches or pull requests

3 participants