Core: Fresh install fails to run (Windows)

Created on 9 Feb 2017  ·  15Comments  ·  Source: adonisjs/core

Hi,
Here are the errors I'm getting when trying to run a fresh installation of Adonis on Windows, some of which relate to https://github.com/adonisjs/adonis-framework/issues/429 and https://github.com/adonisjs/adonis-cli/issues/24

C:\Users\jk23\dev\my_projects                                                                                                                                    
λ adonis new yardstick                                                                                                                                           
    _       _             _         _                                                                                                                            
   / \   __| | ___  _ __ (_)___    | |___                                                                                                                        
  / _ \ / _` |/ _ \| '_ \| / __|_  | / __|                                                                                                                       
 / ___ \ (_| | (_) | | | | \__ \ |_| \__ \                                                                                                                       
/_/   \_\__,_|\___/|_| |_|_|___/\___/|___/                                                                                                                       

√ Your current Node.js & npm version match the AdonisJs requirements!                                                                                            
⠏ Cloning master branch of adonisjs/adonis-app blueprint                                                                                                         
clone: Repository cloned                                                                                                                                         
i Yarn has been detected in your system!                                                                                                                         
? Do you want to use yarn instead of npm? Yes                                                                                                                    
⠋ Installing dependencies using yarn× Installing dependencies failed!                                                                                            
Command failed: cd C:\Users\jk23\dev\my_projects\yardstick; yarn                                                                                                 
The system cannot find the path specified.                                                                                                                       


C:\Users\jk23\dev\my_projects                                                                                                                                    
λ cd yardstick\                                                                                                                                                  

C:\Users\jk23\dev\my_projects\yardstick (master) ([email protected])                                                                                              
λ yarn                                                                                                                                                           
yarn install v0.19.1                                                                                                                                             
info No lockfile found.                                                                                                                                          
[1/4] Resolving packages...                                                                                                                                      
warning adonis-lucid > knex > [email protected]: use uuid module instead                                                                                           
[2/4] Fetching packages...                                                                                                                                       
warning [email protected]: The platform "win32" is incompatible with this module.                                                                                  
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.                                                 
[3/4] Linking dependencies...                                                                                                                                    
[4/4] Building fresh packages...                                                                                                                                 
success Saved lockfile.                                                                                                                                          
Done in 266.04s.                                                                                                                                                 

C:\Users\jk23\dev\my_projects\yardstick (master) ([email protected])                                                                                              
λ ls                                                                                                                                                             
CHANGELOG.md  README.md  ace  app  bootstrap  config  database  node_modules  package.json  providers  public  resources  server.js  storage  yarn.lock          
C:\Users\jk23\dev\my_projects\yardstick (master) ([email protected])                                                                                                                   
λ npm run serve:dev                                                                                                                                                                   

> [email protected] serve:dev C:\Users\jk23\dev\my_projects\yardstick                                                                                                                  
> nodemon --watch app --watch bootstrap --watch config --watch .env -x node server.js                                                                                                 

[nodemon] 1.11.0                                                                                                                                                                      
[nodemon] to restart at any time, enter `rs`                                                                                                                                          
[nodemon] watching: C:\Users\jk23\dev\my_projects\yardstick\app/**/* C:\Users\jk23\dev\my_projects\yardstick\bootstrap/**/* C:\Users\jk23\dev\my_projects\yardstick\config/**/* .env  
[nodemon] starting `node server.js`                                                                                                                                                   
{ Error: ENOENT: no such file or directory, open 'C:\Users\jk23\dev\my_projects\yardstick\.env'                                                                                       
    at Object.fs.openSync (fs.js:558:18)                                                                                                                                              
    at Object.fs.readFileSync (fs.js:468:33)                                                                                                                                          
    at Object.config (C:\Users\jk23\dev\my_projects\yardstick\node_modules\dotenv\lib\main.js:30:37)                                                                                  
    at new Env (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Env\index.js:30:12)                                                                         
    at Object.closure (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\providers\EnvProvider.js:17:14)                                                          
    at Object.Ioc._resolveProvider (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-fold\src\Ioc\index.js:124:53)                                                         
    at Object.Ioc.use (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-fold\src\Ioc\index.js:376:18)                                                                      
    at Ioc.use (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-fold\src\Ioc\index.js:380:18)                                                                             
    at fold.Registrar.register.then (C:\Users\jk23\dev\my_projects\yardstick\bootstrap\http.js:45:19)                                                                                 
    at process._tickCallback (internal/process/next_tick.js:103:7)                                                                                                                    
  errno: -4058,                                                                                                                                                                       
  code: 'ENOENT',                                                                                                                                                                     
  syscall: 'open',                                                                                                                                                                    
  path: 'C:\\Users\\jk23\\dev\\my_projects\\yardstick\\.env' }                                                                                                                        
[nodemon] restarting due to changes...                                                                                                                                                
[nodemon] starting `node server.js`                                                                                                                                                   
{ Error: ENOENT: no such file or directory, open 'C:\Users\jk23\dev\my_projects\yardstick\.env'                                                                                       
    at Object.fs.openSync (fs.js:558:18)                                                                                                                                              
    at Object.fs.readFileSync (fs.js:468:33)                                                                                                                                          
    at Object.config (C:\Users\jk23\dev\my_projects\yardstick\node_modules\dotenv\lib\main.js:30:37)                                                                                  
    at new Env (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Env\index.js:30:12)                                                                         
    at Object.closure (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\providers\EnvProvider.js:17:14)                                                          
    at Object.Ioc._resolveProvider (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-fold\src\Ioc\index.js:124:53)                                                         
    at Object.Ioc.use (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-fold\src\Ioc\index.js:376:18)                                                                      
    at Ioc.use (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-fold\src\Ioc\index.js:380:18)                                                                             
    at fold.Registrar.register.then (C:\Users\jk23\dev\my_projects\yardstick\bootstrap\http.js:45:19)                                                                                 
    at process._tickCallback (internal/process/next_tick.js:103:7)                                                                                                                    
  errno: -4058,                                                                                                                                                                       
  code: 'ENOENT',                                                                                                                                                                     
  syscall: 'open',                                                                                                                                                                    
  path: 'C:\\Users\\jk23\\dev\\my_projects\\yardstick\\.env' }                                                                                                                        
info adonis:framework +1ms serving app on null:null                                                                                                                                   
Error: Invalid listen argument: [object Object]                                                                                                                                       
    at Server.listen (net.js:1384:13)                                                                                                                                                 
    at Server.listen (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Server\index.js:261:31)                                                               
    at fold.Registrar.register.then (C:\Users\jk23\dev\my_projects\yardstick\bootstrap\http.js:103:14)                                                                                
    at process._tickCallback (internal/process/next_tick.js:103:7)                                                                                                                    
    at Module.runMain (module.js:607:11)                                                                                                                                              
    at run (bootstrap_node.js:420:7)                                                                                                                                                  
    at startup (bootstrap_node.js:139:9)                                                                                                                                              
    at bootstrap_node.js:535:3                                                                                                                                                        
[nodemon] clean exit - waiting for changes before restart                                                                                                                             

Most helpful comment

Published, Sorry for the delay

All 15 comments

Closing since related PR has been merged. Will release today

Just encountered this issue myself on windows 7, any ideas?

Hey @haakym !

Which version of the CLI do you have?

@RomainLanz Hey man. Thanks for the fast response...

Adonis CLI 2.1.8
npm 3.10.8
node 7.5.0
Windows 7 64bit

Command ran from http://babun.github.io/

HTH, if there's anything else I can provide please let me know.

This is weird because this problem was fixed in the 2.1.8 version.

Could you take a screenshot of the exact error you have and upload it here?

@RomainLanz

Oh okay, most likely I'm doing something wrong lol.

Is this what you need?

image

Should I be cding into the folder and manually installing via npm?

I find that Yarn runs better for me than npm on Windows.

Sent from my iPhone

On 2 Mar 2017, at 15:38, Dominic notifications@github.com wrote:

@RomainLanz

Oh okay, most likely I'm doing something wrong lol.

Is this what you need?

Should I be cding into the folder and manually installing via npm?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

That's really weird!

It's look like your version hasn't been updated. May you try to delete it and re-install the CLI?

Yup. yarn outperforms npm in many ways 😄

@RomainLanz

Uninstalled then reinstalled adonis cli and tried again new creating a new project, same issue.

Uninstalled cli then installed yarn then reinstalled adonis cli and ran using --yarn flag and got the same issue.

Just to confirm, did you try to install the dependencies using yarn --ignore-optional?

@haakym @niallobrien it seems that the fixed hasn't been published yet.

Ah okay, will keep my eyes on the repo and try later. Thanks for your assistance guys!

Hello, I want to test Adonis for the first time and get stuck by this error when I try npm run serve:dev on Windows 10. When is this going to be released?

Published, Sorry for the delay

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings