Skip to content

[BUG]: .env files in the .DMNO folder throw errors on windows #206

@codyparnell

Description

@codyparnell

dmno version

0.0.37

Steps to reproduce

Create any vite project ( I have to down grade it too vite 5 since dmno throws a peer dependency other wise).

Then run npx dmno init

After DMNO has been initiated running any dmno cli cmd the app errors out. citing that .env files must start with env. This error goes away when the .env.local file in the dmno folder that is auto generated is removed. It appears that any .env file in the folder causes this error on windows.

What is expected?

I get the following error with all dmno cmds

UNCAUGHT EXCEPTION: file name must start with ".env"
UNCAUGHT EXCEPTION: Error: file name must start with ".env"

What is actually happening?

No dmno cmds work with any .env file in the .dmno folder. I do not run into these issues when i run the same code on mac os using the same version of node.

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (24) x64 AMD Ryzen 9 9900X 12-Core Processor
    Memory: 40.14 GB / 61.61 GB
  npmPackages:
    @dmno/vite-integration: ^0.0.16 => 0.0.16
    @eslint/js: ^9.19.0 => 9.19.0
    @types/react: ^19.0.8 => 19.0.8
    @types/react-dom: ^19.0.3 => 19.0.3
    @vitejs/plugin-react: ^4.3.4 => 4.3.4
    dmno: ^0.0.37 => 0.0.37
    eslint: ^9.19.0 => 9.19.0
    eslint-plugin-react-hooks: ^5.0.0 => 5.1.0
    eslint-plugin-react-refresh: ^0.4.18 => 0.4.18
    globals: ^15.14.0 => 15.14.0
    react: ^19.0.0 => 19.0.0
    react-dom: ^19.0.0 => 19.0.0
    typescript: ~5.7.2 => 5.7.3
    typescript-eslint: ^8.22.0 => 8.23.0
    vite: ^5.1.0 => 5.4.14

Any additional comments?

Since the error goes away when there aren't any files named .env I am able to manual import other files into the config and parse them my self. So this is a issue that does have a work around for anyone else effect like me. Thank you for your time :)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions