Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing envrionnment config for env: --dev. ( windows 10 ) #3673

Closed
ionutale opened this issue Jul 24, 2019 · 6 comments
Closed

Missing envrionnment config for env: --dev. ( windows 10 ) #3673

ionutale opened this issue Jul 24, 2019 · 6 comments

Comments

@ionutale
Copy link

Describe the bug
At new projecrt creation, after creating the project it tryies to run and it crashes with this error

Missing envrionnment config for env: --dev.
Make sure the directory ./config/environments/--dev exists

Steps to reproduce the behavior
npm install strapi@beta -g
strapi new my-project --quickstart

Expected behavior
to work!

Screenshots
image

System

  • Node.js version: v12.2.0
  • NPM version: 6.9.0
  • Strapi version: latest beta
  • Operating system: win 10
@derrickmehaffy
Copy link
Member

@jhonyourangel check your config/environments folder if there is one named --dev delete it

@ionutale
Copy link
Author

ionutale commented Jul 25, 2019

there is none
image

also now i have this other error:
error TypeError: Cannot read property 'defaultConnection' of undefined

image

but i am not sure what went wrong here.
yesterday i had the same issue, and tried to add a mongodb connection since i don't have a sqlite on my windows pc.

image

i suspect that the strapi generator is not unpacking all the stuff or has some issues on windows

@ionutale
Copy link
Author

ps: i have tried to create a project on my personal computer, a mac, and worked at first try

@ionutale
Copy link
Author

looks like the command
npm run develop returns error

Missing envrionnment config for env: --dev.
Make sure the directory ./config/environments/--dev exists

while npm run start

[2019-07-25T13:46:45.910Z] debug ⛔️ Server wasn't able to start properly.
[2019-07-25T13:46:45.916Z] error TypeError: Cannot read property 'defaultConnection' of undefined
    at module.exports (C:\Users\iutale\Developer\nodejs\testcms2\node_modules\strapi\lib\core\bootstrap.js:26:47)
    at Strapi.load (C:\Users\iutale\Developer\nodejs\testcms2\node_modules\strapi\lib\Strapi.js:283:11)
    at async Strapi.start (C:\Users\iutale\Developer\nodejs\testcms2\node_modules\strapi\lib\Strapi.js:123:7)

image

@ionutale
Copy link
Author

i have to say though that --dev looks pretty familiar as a environment property.

maybe there is a type somewhere, that i am unable to find while searching the project

shouldn't this
Make sure the directory **./config/environments/--dev** exists
be
Make sure the directory **./config/environments/development** exists

?

@ionutale
Copy link
Author

just run this in powershel
$env:NODE_ENV="development"

there is no default env that points to development.
hhmmm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants