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

Strapi new project command freezes on database connection setting portion of CLI wizard on Windows #1281

Closed
arcee123 opened this Issue May 27, 2018 · 25 comments

Comments

Projects
None yet
@arcee123
Copy link

arcee123 commented May 27, 2018

Informations

  • Node.js version: 10.2.1
  • npm version: 6.2.1
  • Strapi version: 3.0.0-alpha.12.2
  • Database: 3.6.5
  • Operating system: Windows Server 2016

What is the current behavior?
When selecting the database type (Mongodb in this case), the options for logging on do not appear. The command prompt sticks and freezes in session. I have also attempted to run the strapi installer attempting to connect with MySQL, only ending in the same result

Steps to reproduce the problem
npm install strapi -g
strapi new testapi
*Selected MongoDB

image

What is the expected behavior?
strapi asks for the MongoDB login configuration.

Suggested solutions
Unknown at this time. Request diagnosis steps.

@lauriejim

This comment has been minimized.

Copy link
Member

lauriejim commented May 27, 2018

Hello @arcee123 !
I will need your help to try to understand where you issue come from.

Can you please investigate on this file https://github.com/strapi/strapi/blob/master/packages/strapi-generate-new/lib/before.js
It's where the database connection form is write.
And here https://github.com/strapi/strapi/blob/master/packages/strapi-mongoose/lib/utils/connectivity.js
for the database connection test.

We are currently on another feature and bug fix. Since time is lacking on our side, feel free investigate and to submit a PR, we’ll appreciate your contribution on this issue!

Check out the contributing guide to get started: https://github.com/strapi/strapi/blob/master/.github/CONTRIBUTING.md

@arcee123

This comment has been minimized.

Copy link
Author

arcee123 commented May 28, 2018

Hi @lauriejim, so it appears like this problem is a Node 10.x.x version compatibility issue. When I downgraded node back down to 8.x.x, it fired up correctly. I'll be anxiously waiting for the next upgrade. Thanks.

@dertuerke

This comment has been minimized.

Copy link

dertuerke commented May 29, 2018

Same problem here:

  • with Node 10.2.1 it freez after MongoDB
  • with Node-LTS 8.11.2 its work
@opgbaudouin

This comment has been minimized.

Copy link

opgbaudouin commented Jun 3, 2018

Same here
node 10.2.1
npm 6.1.0
strapi 3.0.0-alpha.12.2

windows 10 64bit

(trying to replicate an earlier bug)

@derrickmehaffy

This comment has been minimized.

Copy link
Contributor

derrickmehaffy commented Jun 3, 2018

@dertuerke and @opgbaudouin I am unable to reproduce this issue on Ubuntu using the following versions:

Node 10.1.0
Node 10.2.1
Node 10.3.0

All using NPM 6.1.0, there might be an issue with your locally installed node version, or if you are on windows there are known issues with this. I would recommend if you are on a Windows 10 machine, you install the WSL (Ubuntu I recommend) and do further development on there.

Or at the very least you can test to confirm the issue is related to windows. The Strapi team generally do all their development work on Mac/Linux thus Windows development support isn't a major priority for them. (And they may not have the machines to test it themselves)

@derrickmehaffy

This comment has been minimized.

@opgbaudouin

This comment has been minimized.

Copy link

opgbaudouin commented Jun 5, 2018

I can confirm NO issues on

CentOS Linux release 7.5.1804
Strapi version: 3.0.0-alpha.12.2
Node: 10.3.0
npm: 6.1.0

Nonetheless it should be highlighted that as of this version with that combination something broke on Windows 10 - or simply 'limit' the scope of strapi. Obviously no-one will run production stuff with node on a Windows box, but many of us do use it for development. Up to the team to class as BUG or not :)

@derrickmehaffy

This comment has been minimized.

Copy link
Contributor

derrickmehaffy commented Jun 5, 2018

@opgbaudouin it's certainly a bug, the team is aware of issues with development on Windows, it's just not a priority for them at the moment. For those on windows, you can either work in the WSL or run a virtual machine of whatever Linux flavor you want. :D

@lauriejim

This comment has been minimized.

Copy link
Member

lauriejim commented Jun 5, 2018

If it's work on Node LTS version it's OK.
@arcee123 and @dertuerke can you confirm it works with Node 9 ?

@arcee123

This comment has been minimized.

Copy link
Author

arcee123 commented Jun 7, 2018

ok. It appears that windows and strapi are not good bedfellows.
Even with Node 9, I run into problems where the strapi installation cannot find python.

As a result, I recommend that this library be tagged to support linux, until a decision is made to support windows specifically. While I love linux over windows, I recommend we put it in as a feature request for future releases that code be expanded for windows support.

Thanks.

@lauriejim lauriejim changed the title strapi new project command freezes on database connection setting portion of CLI wizard. Strapi new project command freezes on database connection setting portion of CLI wizard on Windows Jun 8, 2018

@ranjithkumar8352

This comment has been minimized.

Copy link

ranjithkumar8352 commented Jun 10, 2018

@kevinhaesendonckx

This comment has been minimized.

Copy link

kevinhaesendonckx commented Jul 4, 2018

Issue for me was fixed by downgrading from Node v10 to node v8

@corinthian13

This comment has been minimized.

Copy link

corinthian13 commented Aug 17, 2018

+1 kevinhaesendonckx : Yes - NodeJS 8.11.4 works fine with NPM 6.0 and MongoDB 4.0

@httpiago

This comment has been minimized.

Copy link

httpiago commented Aug 18, 2018

I'm having the same problem. My settings are the same as described by the people above:
Windows 10, Node 10.2.0, Strapi 3.0.0-alpha

I want to test to use in a project but I'm afraid of giving error in production

@corinthian13

This comment has been minimized.

Copy link

corinthian13 commented Aug 18, 2018

@httpiago:

If this is the first time that you have used Strapi, then it is far too early to build a real commercial project with it. You must first evaluate it on a private project of your own that may have already been implemented using another technology. Then you can compare performance, stability, etc.

Firstly, you must install NodeJS version 8.
This is the latest stable version that works with Strapi.
Despite the fact that Strapi says here that it needs version 9 or later of NodeJS, Strapi will work with NodeJS v8.
After installing Node 8, checking that your MongoDB is >= v3.4 and your npm is >= v5, follow the instructions in the Getting Started guide to create your first project.
After that you only have the tutorials to guide you.
The odd YouTube video that exists are usually old and too badly videoed to clearly see the PC screen.
But there are some videos from Brazil #1 #2 on YouTube that may be useful to you.

@hari-haran

This comment has been minimized.

Copy link

hari-haran commented Sep 7, 2018

Works with Node V8! BTW instead of downgrading, install nvm(node version management tool) to have multiple version of nodejs. Cheers!

@BiscuiTech

This comment has been minimized.

Copy link

BiscuiTech commented Sep 12, 2018

Quick tip: if you're like me and don't want to install nvm nor do you want to change your Node.JS install, simply create the app through your WSL. I made my destination folder into my mnt/c/Users/.../Documents and everything works fine.

@maturanomx

This comment has been minimized.

Copy link
Contributor

maturanomx commented Sep 12, 2018

Apparently passing the data to the CLI also work: #1898 (comment)

@witek1902

This comment has been minimized.

Copy link

witek1902 commented Nov 14, 2018

I confirm, works with npm v8 (8.11.3).

@anubhaavofficial

This comment has been minimized.

Copy link

anubhaavofficial commented Nov 25, 2018

"strapi new ......" doesn't work with Node 10.xx or > . Works with 8.xx on windows. So, when will this be fixed?

@derrickmehaffy

This comment has been minimized.

Copy link
Contributor

derrickmehaffy commented Nov 25, 2018

@anubhaavofficial when the Strapi team have time, it isn't a priority for them right now. You're more than welcome to submit a PR. 😃

@MohammedFaragallah

This comment has been minimized.

Copy link

MohammedFaragallah commented Nov 26, 2018

The same problem fixed by git bash as administrator and everything works fine

node -v 10.11.0
npm -v 6.4.1
win10 x64

@anubhaavofficial

This comment has been minimized.

Copy link

anubhaavofficial commented Nov 26, 2018

@anubhaavofficial when the Strapi team have time, it isn't a priority for them right now. You're more than welcome to submit a PR. 😃

Ok, Thanks, I worked a way around. I used Node 8.xx for installation then switched to Node 11.xx. It is running fine now.

@eddyystop

This comment has been minimized.

Copy link

eddyystop commented Dec 1, 2018

I came across your posts while searching for the same problem with my @feathers-plus/cli. This is what I've tracked down so far.

Yeoman uses queues to schedule prompts together, to schedule writing together, to schedule copy, json, tpl writes together. The prompting runs fine on Node10 including the prompting callback, but the writing task never gets started.

I've received no reponse to my issue from Yeoman yeoman/generator#1098 . No response for 14 days.

@strapi strapi locked as too heated and limited conversation to collaborators Dec 1, 2018

@lauriejim

This comment has been minimized.

Copy link
Member

lauriejim commented Dec 1, 2018

Currently Windows has known issues, right now it is recommended that you either use WSL (Windows Subsystem Linux) or setup a Linux virtual machine. Better support will come eventually but right now it is not a priority for core Strapi development.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.