Core: Fresh install fails to run (Windows)

Created on 19 Jan 2017  ·  17Comments  ·  Source: adonisjs/core

Hi all, I just did a fresh install of Adonis on Windows, installed all dependencies and ran npm run dev.
Console output:

C:\Users\jk23\dev\my_projects\tinyissue-adonis  ([email protected])
λ npm run dev

> [email protected] dev C:\Users\jk23\dev\my_projects\tinyissue-adonis
> 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\tinyissue-adonis\app/**/* C:\Users\jk23\dev\my_projects\tinyissue-adonis\bootstrap/**/* C:\Users\jk23\dev\my_projects\tinyissue-adonis\config/**/* .env
[nodemon] starting `node server.js`
info adonis:framework +0ms serving app on localhost:3333
TypeError: keygrip.encrypt is not a function
    at Object.Cookie.create (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\node-cookie\src\Cookie\index.js:157:29)
    at CookieManager.set (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\adonis-framework\src\Session\CookieManager.js:50:23)
    at Session.setSessionId (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\adonis-framework\src\Session\index.js:137:24)
    at Session.put (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\adonis-framework\src\Session\index.js:217:10)
    at next (native)
    at onFulfilled (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\co\index.js:65:19)
    at C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\co\index.js:54:5
    at co (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\co\index.js:50:10)
    at toPromise (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\co\index.js:118:63)
    at next (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\co\index.js:99:29)
TypeError: keygrip.encrypt is not a function
    at Object.Cookie.create (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\node-cookie\src\Cookie\index.js:157:29)
    at CookieManager.set (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\adonis-framework\src\Session\CookieManager.js:50:23)
    at Session.setSessionId (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\adonis-framework\src\Session\index.js:137:24)
    at Session.put (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\adonis-framework\src\Session\index.js:217:10)
    at next (native)
    at onFulfilled (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\co\index.js:65:19)
    at C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\co\index.js:54:5
    at co (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\co\index.js:50:10)
    at toPromise (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\co\index.js:118:63)
    at next (C:\Users\jk23\dev\my_projects\tinyissue-adonis\node_modules\co\index.js:99:29)

Browser output:
image

Please note that I've cleared all cookies from my browser (Chrome).

Most helpful comment

Yup will update that too

All 17 comments

Seems like some installation issue. Mind reinstalling all the packages?

closing since no update from issue reporter

Please leave open until I've had a chance to re-test, thanks.

Here's the process I followed. Note that I am behind a company proxy but have my CLI configured to route through a local proxy first (via Fiddler) and can clone projects from Github, install from npm etc. with no problems.

λ npm i -g adonis-cli                                                                      
C:\Program Files\nodejs\adonis -> C:\Program Files\nodejs\node_modules\adonis-cli\index.js 
C:\Program Files\nodejs                                                                    
`-- [email protected]                                                                       


C:\Users\jk23\dev\my_projects                                                              
λ adonis new yardstick                                                                     
-----------AdonisJs requirements check--------------                                       
AdonisJs needs Node.JS >=4.0.0 and npm >=3.0.0                                             

Verifying node.js and npm current installed versions...                                    

Your current Node.JS version: 6.6.0                                                        
Your current npm version: 3.10.8                                                           

Project path: C:\Users\jk23\dev\my_projects\yardstick                                      
Cloning into 'yardstick'...                                                                
Cleaning project...                                                                        
Setting up app key...                                                                      
Fixing ace file...                                                                         
Installing dependencies may take a while                                                   
Installing dependencies... /

It seemed to hang at this point and I could not see any network activity to the npm registry within Fiddler. The same happened when I tried running npm i.

I then resorted to trying yarn.

C:\Users\jk23\dev\my_projects\yardstick  ([email protected])
λ yarn
yarn install v0.16.1
info No lockfile found.
[1/4] Resolving packages...
warning adonis-lucid > knex > [email protected]: use uuid module instead
warning adonis-fold > coveralls > request > [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...
[-/3] ⠠ waiting...
[2/3] ⠐ fsevents: AttributeError: 'MSVSProject' object has no attribute 'iteritems'
[3/3] ⠐ uws
[-/3] ⠐ waiting...
error Error running install script for optional dependency: "C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents: Command failed.\nExit code: 1\nCommand: C:\\WINDOWS\\system32\\cmd.exe\nArguments: /d /s /c node-pre-gyp install --fallback-to-build\nDirectory: C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using [email protected]\nnode-pre-gyp info using [email protected] | win32 | x64\nnode-pre-gyp info check checked for \"C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node\" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v48-win32-x64.tar.gz\nnode-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v48-win32-x64.tar.gz \nnode-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp) \nnode-pre-gyp http unable to verify the first certificate \n\r\nC\bL\bI\bN\bK\b \bC\bL\bI\bN\bK\b \bC:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents>if not defined npm_config_node_gyp (node \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\bin\\node-gyp-bin\\\\..\\..\\node_modules\\node-gyp\\bin\\node-gyp.js\" clean )  else (node  clean ) \r\ngyp info it worked if it ends with ok\ngyp info using [email protected]\ngyp info using [email protected] | win32 | x64\ngyp info ok \n\r\nC\bL\bI\bN\bK\b \bC\bL\bI\bN\bK\b \bC:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents>if not defined npm_config_node_gyp (node \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\bin\\node-gyp-bin\\\\..\\..\\node_modules\\node-gyp\\bin\\node-gyp.js\" configure --fallback-to-build --module=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node --module_name=fse --module_path=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64 )  else (node  configure --fallback-to-build --module=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node --module_name=fse --module_path=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64 ) \r\ngyp info it worked if it ends with ok\ngyp info using [email protected]\ngyp info using [email protected] | win32 | x64\ngyp info spawn C:\\Python27\\python.EXE\ngyp info spawn args [ 'C:\\\\Users\\\\jk23\\\\AppData\\\\Roaming\\\\nvm\\\\v6.6.0\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp\\\\gyp\\\\gyp_main.py',\ngyp info spawn args   'binding.gyp',\ngyp info spawn args   '-f',\ngyp info spawn args   'msvs',\ngyp info spawn args   '-G',\ngyp info spawn args   'msvs_version=auto',\ngyp info spawn args   '-I',\ngyp info spawn args   'C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents\\\\build\\\\config.gypi',\ngyp info spawn args   '-I',\ngyp info spawn args   'C:\\\\Users\\\\jk23\\\\AppData\\\\Roaming\\\\nvm\\\\v6.6.0\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp\\\\addon.gypi',\ngyp info spawn args   '-I',\ngyp info spawn args   'C:\\\\Users\\\\jk23\\\\.node-gyp\\\\6.6.0\\\\include\\\\node\\\\common.gypi',\ngyp info spawn args   '-Dlibrary=shared_library',\ngyp info spawn args   '-Dvisibility=default',\ngyp info spawn args   '-Dnode_root_dir=C:\\\\Users\\\\jk23\\\\.node-gyp\\\\6.6.0',\ngyp info spawn args   '-Dnode_gyp_dir=C:\\\\Users\\\\jk23\\\\AppData\\\\Roaming\\\\nvm\\\\v6.6.0\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp',\ngyp info spawn args   '-Dnode_lib_file=node.lib',\ngyp info spawn args   '-Dmodule_root_dir=C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents',\ngyp info spawn args   '--depth=.',\ngyp info spawn args   '--no-parallel',\ngyp info spawn args   '--generator-output',\ngyp info spawn args   'C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents\\\\build',\ngyp info spawn args   '-Goutput_dir=.' ]\nTraceback (most recent call last):\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\gyp_main.py\", line 16, in <module>\r\n    sys.exit(gyp.script_main())\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\__init__.py\", line 545, in script_main\r\n    return main(sys.argv[1:])\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\__init__.py\", line 538, in main\r\n    return gyp_main(args)\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\__init__.py\", line 523, in gyp_main\r\n    generator.GenerateOutput(flat_list, targets, data, params)\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 2003, in GenerateOutput\r\n
sln_projects, project_objects, flat=msvs_version.FlatSolution())\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 1762, in _GatherSolutionFolders\r\n    return _DictsToFolders('', root, flat)\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 1715, in _DictsToFolders\r\n
   for folder, contents in bucket.iteritems():\r\nAttributeError: 'MSVSProject' object has no attribute 'iteritems'\r\ngyp ERR! configure error \ngyp ERR! stack Error: `gyp` failed with exit code: 1\ngyp ERR! stack     at ChildProcess.onCpExit (C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\lib\\configure.js:305:16)\ngyp ERR! stack     at emitTwo (events.js:106:13)\ngyp ERR! stack     at ChildProcess.emit (events.js:191:7)\ngyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)\ngyp ERR! System Windows_NT 6.1.7601\ngyp ERR! command \"C:\\\\Program Files\\\\nodejs\\\\node.exe\" \"C:\\\\Users\\\\jk23\\\\AppData\\\\Roaming\\\\nvm\\\\v6.6.0\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"configure\" \"--fallback-to-build\" \"--module=C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents\\\\lib\\\\binding\\\\Release\\\\node-v48-win32-x64\\\\fse.node\" \"--module_name=fse\" \"--module_path=C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents\\\\lib\\\\binding\\\\Release\\\\node-v48-win32-x64\"\ngyp ERR! cwd C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\ngyp ERR! node -v v6.6.0\ngyp ERR! node-gyp -v v3.4.0\ngyp ERR! not ok \nnode-pre-gyp ERR! build error \nnode-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node --module_name=fse --module_path=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64' (1)\nnode-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\node_modules\\node-pre-gyp\\lib\\util\\compile.js:83:29)\nnode-pre-gyp ERR! stack     at emitTwo (events.js:106:13)\nnode-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)\nnode-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)\nnode-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)\nnode-pre-gyp ERR! System Windows_NT 6.1.7601\nnode-pre-gyp ERR! command \"C:\\\\Program Files\\\\nodejs\\\\node.exe\" \"C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents\\\\node_modules\\\\node-pre-gyp\\\\bin\\\\node-pre-gyp\" \"install\" \"--fallback-to-build\"\nnode-pre-gyp ERR! cwd C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\nnode-pre-gyp ERR! node -v v6.6.0\nnode-pre-gyp ERR! node-pre-gyp -v v0.6.32\nnode-pre-gyp ERR! not ok \nFailed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\\Users\\jk23success Saved lockfile.
Done in 526.54s.

C:\Users\jk23\dev\my_projects\yardstick  ([email protected])
λ npm run dev

> [email protected] 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`
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] starting `node server.js`
info adonis:framework +0ms serving app on localhost:3333
TypeError: keygrip.encrypt is not a function
    at Object.Cookie.create (C:\Users\jk23\dev\my_projects\yardstick\node_modules\node-cookie\src\Cookie\index.js:157:29)
    at CookieManager.set (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\CookieManager.js:50:23)
    at Session.setSessionId (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\index.js:137:24)
    at Session.put (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\index.js:217:10)
    at next (native)
    at onFulfilled (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:65:19)
    at C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:54:5
    at co (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:50:10)
    at toPromise (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:118:63)
    at next (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:99:29)
TypeError: keygrip.encrypt is not a function
    at Object.Cookie.create (C:\Users\jk23\dev\my_projects\yardstick\node_modules\node-cookie\src\Cookie\index.js:157:29)
    at CookieManager.set (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\CookieManager.js:50:23)
    at Session.setSessionId (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\index.js:137:24)
    at Session.put (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\index.js:217:10)
    at next (native)
    at onFulfilled (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:65:19)
    at C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:54:5
    at co (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:50:10)
    at toPromise (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:118:63)
    at next (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:99:29)

So, after this failed, I figured I'd reinstall the project from scratch, skip the npm installation process and just try yarn once more:

λ adonis new yardstick --skip-npm
-----------AdonisJs requirements check--------------
AdonisJs needs Node.JS >=4.0.0 and npm >=3.0.0

Verifying node.js and npm current installed versions...

Your current Node.JS version: 6.6.0
Your current npm version: 3.10.8

Project path: C:\Users\jk23\dev\my_projects\yardstick
Cloning into 'yardstick'...
Cleaning project...
Setting up app key...
Fixing ace file...
Skipping npm install as instructed
Your project is ready, follow below instructions to get ready
--------------------------------------
   GETTING STARTED
--------------------------------------
1. cd yardstick
2. npm run dev



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

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

C:\Users\jk23\dev\my_projects\yardstick  ([email protected])
λ yarn
yarn install v0.16.1
info No lockfile found.
[1/4] Resolving packages...
warning adonis-lucid > knex > [email protected]: use uuid module instead
warning adonis-fold > coveralls > request > [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...
[-/3] ⠈ waiting...
[2/3] ⠈ fsevents: not ok
[3/3] ⠈ uws
[-/3] ⠈ waiting...
error Error running install script for optional dependency: "C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents: Command failed.\nExit code: 1\nCommand: C:\\WINDOWS\\system32\\cmd.exe\nArguments: /d /s /c node-pre-gyp install --fallback-to-build\nDirectory: C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using [email protected]\nnode-pre-gyp info using [email protected] | win32 | x64\nnode-pre-gyp info check checked for \"C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node\" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v48-win32-x64.tar.gz\nnode-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v48-win32-x64.tar.gz \nnode-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp) \nnode-pre-gyp http unable to verify the first certificate \n\r\nC\bL\bI\bN\bK\b \bC\bL\bI\bN\bK\b \bC:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents>if not defined npm_config_node_gyp (node \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\bin\\node-gyp-bin\\\\..\\..\\node_modules\\node-gyp\\bin\\node-gyp.js\" clean )  else (node  clean ) \r\ngyp info it worked if it ends with ok\ngyp info using [email protected]\ngyp info using [email protected] | win32 | x64\ngyp info ok \n\r\nC\bL\bI\bN\bK\b \bC\bL\bI\bN\bK\b \bC:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents>if not defined npm_config_node_gyp (node \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\bin\\node-gyp-bin\\\\..\\..\\node_modules\\node-gyp\\bin\\node-gyp.js\" configure --fallback-to-build --module=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node --module_name=fse --module_path=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64 )  else (node  configure --fallback-to-build --module=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node --module_name=fse --module_path=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64 ) \r\ngyp info it worked if it ends with ok\ngyp info using [email protected]\ngyp info using [email protected] | win32 | x64\ngyp info spawn C:\\Python27\\python.EXE\ngyp info spawn args [ 'C:\\\\Users\\\\jk23\\\\AppData\\\\Roaming\\\\nvm\\\\v6.6.0\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp\\\\gyp\\\\gyp_main.py',\ngyp info spawn args   'binding.gyp',\ngyp info spawn args   '-f',\ngyp info spawn args   'msvs',\ngyp info spawn args   '-G',\ngyp info spawn args   'msvs_version=auto',\ngyp info spawn args   '-I',\ngyp info spawn args   'C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents\\\\build\\\\config.gypi',\ngyp info spawn args   '-I',\ngyp info spawn args   'C:\\\\Users\\\\jk23\\\\AppData\\\\Roaming\\\\nvm\\\\v6.6.0\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp\\\\addon.gypi',\ngyp info spawn args   '-I',\ngyp info spawn args   'C:\\\\Users\\\\jk23\\\\.node-gyp\\\\6.6.0\\\\include\\\\node\\\\common.gypi',\ngyp info spawn args   '-Dlibrary=shared_library',\ngyp info spawn args   '-Dvisibility=default',\ngyp info spawn args   '-Dnode_root_dir=C:\\\\Users\\\\jk23\\\\.node-gyp\\\\6.6.0',\ngyp info spawn args   '-Dnode_gyp_dir=C:\\\\Users\\\\jk23\\\\AppData\\\\Roaming\\\\nvm\\\\v6.6.0\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp',\ngyp info spawn args   '-Dnode_lib_file=node.lib',\ngyp info spawn args   '-Dmodule_root_dir=C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents',\ngyp info spawn args   '--depth=.',\ngyp info spawn args   '--no-parallel',\ngyp info spawn args   '--generator-output',\ngyp info spawn args   'C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents\\\\build',\ngyp info spawn args   '-Goutput_dir=.' ]\nTraceback (most recent call last):\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\gyp_main.py\", line 16, in <module>\r\n    sys.exit(gyp.script_main())\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\__init__.py\", line 545, in script_main\r\n    return main(sys.argv[1:])\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\__init__.py\", line 538, in main\r\n    return gyp_main(args)\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\__init__.py\", line 523, in gyp_main\r\n    generator.GenerateOutput(flat_list, targets, data, params)\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 2003, in GenerateOutput\r\n
sln_projects, project_objects, flat=msvs_version.FlatSolution())\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 1762, in _GatherSolutionFolders\r\n    return _DictsToFolders('', root, flat)\r\n  File \"C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 1715, in _DictsToFolders\r\n
   for folder, contents in bucket.iteritems():\r\nAttributeError: 'MSVSProject' object has no attribute 'iteritems'\r\ngyp ERR! configure error \ngyp ERR! stack Error: `gyp` failed with exit code: 1\ngyp ERR! stack     at ChildProcess.onCpExit (C:\\Users\\jk23\\AppData\\Roaming\\nvm\\v6.6.0\\node_modules\\yarn\\node_modules\\node-gyp\\lib\\configure.js:305:16)\ngyp ERR! stack     at emitTwo (events.js:106:13)\ngyp ERR! stack     at ChildProcess.emit (events.js:191:7)\ngyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)\ngyp ERR! System Windows_NT 6.1.7601\ngyp ERR! command \"C:\\\\Program Files\\\\nodejs\\\\node.exe\" \"C:\\\\Users\\\\jk23\\\\AppData\\\\Roaming\\\\nvm\\\\v6.6.0\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"configure\" \"--fallback-to-build\" \"--module=C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents\\\\lib\\\\binding\\\\Release\\\\node-v48-win32-x64\\\\fse.node\" \"--module_name=fse\" \"--module_path=C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents\\\\lib\\\\binding\\\\Release\\\\node-v48-win32-x64\"\ngyp ERR! cwd C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\ngyp ERR! node -v v6.6.0\ngyp ERR! node-gyp -v v3.4.0\ngyp ERR! not ok \nnode-pre-gyp ERR! build error \nnode-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node --module_name=fse --module_path=C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64' (1)\nnode-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\\node_modules\\node-pre-gyp\\lib\\util\\compile.js:83:29)\nnode-pre-gyp ERR! stack     at emitTwo (events.js:106:13)\nnode-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)\nnode-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)\nnode-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)\nnode-pre-gyp ERR! System Windows_NT 6.1.7601\nnode-pre-gyp ERR! command \"C:\\\\Program Files\\\\nodejs\\\\node.exe\" \"C:\\\\Users\\\\jk23\\\\dev\\\\my_projects\\\\yardstick\\\\node_modules\\\\fsevents\\\\node_modules\\\\node-pre-gyp\\\\bin\\\\node-pre-gyp\" \"install\" \"--fallback-to-build\"\nnode-pre-gyp ERR! cwd C:\\Users\\jk23\\dev\\my_projects\\yardstick\\node_modules\\fsevents\nnode-pre-gyp ERR! node -v v6.6.0\nnode-pre-gyp ERR! node-pre-gyp -v v0.6.32\nnode-pre-gyp ERR! not ok \nFailed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\\Users\\jk23success Saved lockfile.
Done in 539.83s.

C:\Users\jk23\dev\my_projects\yardstick  ([email protected])
λ npm run dev

> [email protected] 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`
[nodemon] restarting due to changes...
[nodemon] starting `node server.js`
[nodemon] restarting due to changes...
[nodemon] starting `node server.js`
[nodemon] restarting due to changes...
[nodemon] starting `node server.js`
info adonis:framework +0ms serving app on localhost:3333
TypeError: keygrip.encrypt is not a function
    at Object.Cookie.create (C:\Users\jk23\dev\my_projects\yardstick\node_modules\node-cookie\src\Cookie\index.js:157:29)
    at CookieManager.set (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\CookieManager.js:50:23)
    at Session.setSessionId (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\index.js:137:24)
    at Session.put (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\index.js:217:10)
    at next (native)
    at onFulfilled (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:65:19)
    at C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:54:5
    at co (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:50:10)
    at toPromise (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:118:63)
    at next (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:99:29)
TypeError: keygrip.encrypt is not a function
    at Object.Cookie.create (C:\Users\jk23\dev\my_projects\yardstick\node_modules\node-cookie\src\Cookie\index.js:157:29)
    at CookieManager.set (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\CookieManager.js:50:23)
    at Session.setSessionId (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\index.js:137:24)
    at Session.put (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\index.js:217:10)
    at next (native)
    at onFulfilled (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:65:19)
    at C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:54:5
    at co (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:50:10)
    at toPromise (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:118:63)
    at next (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:99:29)
TypeError: keygrip.encrypt is not a function
    at Object.Cookie.create (C:\Users\jk23\dev\my_projects\yardstick\node_modules\node-cookie\src\Cookie\index.js:157:29)
    at CookieManager.set (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\CookieManager.js:50:23)
    at Session.setSessionId (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\index.js:137:24)
    at Session.put (C:\Users\jk23\dev\my_projects\yardstick\node_modules\adonis-framework\src\Session\index.js:217:10)
    at next (native)
    at onFulfilled (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:65:19)
    at C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:54:5
    at co (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:50:10)
    at toPromise (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:118:63)
    at next (C:\Users\jk23\dev\my_projects\yardstick\node_modules\co\index.js:99:29)

Unfortunately I get the same error regardless.

I can see the installation everytime get's aborted when trying to install fsevents, which is an optional dependency.

There are couple of things that we can try and ie

Can u try to run the following command via npm. Since I am not sure whether yarn allows skipping optional dependencies or not.

npm install --no-optional

Hi @thetutlage - I seem to be experiencing some issues installing packages from npm all of a sudden, which may explain some of the issues above. Nothing has changed on my system, so I'm unsure what the issue could be (seems to be having trouble getting out through the proxy). I will investigate further and report back. Thanks.

Okay, upon further investigation, it seems that I can install a single npm package with no problems. But run into issues with npm when trying to install any project's dependencies. I've upgraded to the latest version of node & npm but am uncertain if it's only me that's experiencing these issues with Windows.

yarn --ignore-optional seems to have worked. Thanks.

i have the same problem @thetutlage
yarn --ignore-optional is not work

when i comments APP_KEY
The project can work

this is my operation
PORT=3334

APP_KEY=BpNV9ynbPGmjE5JPqpby6n2YzGpWdzkq

NODE_ENV=development

Exactly the same problem as wuxiangwa

I've just done a fresh install of my node_modules and am now getting this issue on MacOS

@thetutlage Does node-cookie need a new npm release so that keygrip isn't included?

@wuxiangwa's solution works for me but I guess this is because all encryption methods are bypassed completely

Please create new issues, since closed issues are usually missed.

I have just pushed a fix. So

rm -rf node_modules && npm i should work

@thetutlage Thanks, that seems to work. Does node-cookie need updating on adonis-middleware too? It's not causing an issue for me but might for others

Yup will update that too

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