static-dev/spike-core

Windows Support

Closed this issue ยท 6 comments

EnMod commented

Was about to report the latest message myself actually (just did a roll-of-the-dice reinstall), that's great that the culprit seems cornered! Haven't been in the gitter as of late, but I'm willing to test with my Windows machines if you need a test environment for any solutions ๐Ÿ‘

Definitely solving the windows issue within the week ๐Ÿ˜

EnMod commented

Hmm...getting this output on Windows even after I updated to 1.3.0. Peculiar:

c:\Users\EnMod\AppData\Roaming\npm\node_modules\spike\node_modules\webpack\lib\webpack.js:19                                                                      
                throw new WebpackOptionsValidationError(webpackOptionsValidationErrors);                                                                         
                ^                                                                                                                                                
                                                                                                                                                                 
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.       
 - configuration.module.rules[0].use should be one of these:                                                                                                     
   non-empty string | function | object { loader?, options?, query? } | function | [non-empty string | function | object { loader?, options?, query? }]          
   Details:                                                                                                                                                      
    * configuration.module.rules[0].use should be a string.                                                                                                      
    * configuration.module.rules[0].use should be an instance of function.                                                                                       
    * configuration.module.rules[0].use should be an object.                                                                                                     
    * configuration.module.rules[0].use should be one of these:                                                                                                  
      non-empty string | function | object { loader?, options?, query? }                                                                                         
    * configuration.module.rules[0].use should be an instance of function.                                                                                       
    * configuration.module.rules[0].use[1] should be a string.                                                                                                   
    * configuration.module.rules[0].use[1] should be an instance of function.                                                                                    
    * configuration.module.rules[0].use[1].options should be an object.                                                                                          
    * configuration.module.rules[0].use[1].options should be a string.                                                                                           
    * configuration.module.rules[0].use[1].options should be one of these:                                                                                       
      object | string                                                                                                                                            
    * configuration.module.rules[0].use[1] should be one of these:                                                                                               
      non-empty string | function | object { loader?, options?, query? }                                                                                         
 - configuration.module.rules[2].use should be one of these:                                                                                                     
   non-empty string | function | object { loader?, options?, query? } | function | [non-empty string | function | object { loader?, options?, query? }]          
   Details:                                                                                                                                                      
    * configuration.module.rules[2].use should be a string.                                                                                                      
    * configuration.module.rules[2].use should be an instance of function.                                                                                       
    * configuration.module.rules[2].use should be an object.                                                                                                     
    * configuration.module.rules[2].use should be one of these:                                                                                                  
      non-empty string | function | object { loader?, options?, query? }                                                                                         
    * configuration.module.rules[2].use should be an instance of function.                                                                                       
    * configuration.module.rules[2].use[1] should be a string.                                                                                                   
    * configuration.module.rules[2].use[1] should be an instance of function.                                                                                    
    * configuration.module.rules[2].use[1].options should be an object.                                                                                          
    * configuration.module.rules[2].use[1].options should be a string.                                                                                           
    * configuration.module.rules[2].use[1].options should be one of these:                                                                                       
      object | string                                                                                                                                            
    * configuration.module.rules[2].use[1] should be one of these:                                                                                               
      non-empty string | function | object { loader?, options?, query? }                                                                                         
    at webpack (c:\Users\EnMod\AppData\Roaming\npm\node_modules\spike\node_modules\webpack\lib\webpack.js:19:9)                                                   
    at Spike.watch (c:\Users\EnMod\AppData\Roaming\npm\node_modules\spike\node_modules\spike-core\lib\index.js:56:21)                                             
    at process.nextTick (c:\Users\EnMod\AppData\Roaming\npm\node_modules\spike\lib\watch.js:3:34)                                                                 
    at _combinedTickCallback (internal/process/next_tick.js:73:7)                                                                                                
    at process._tickCallback (internal/process/next_tick.js:104:9)                                                                                               
    at Module.runMain (module.js:606:11)                                                                                                                         
    at run (bootstrap_node.js:393:7)                                                                                                                             
    at startup (bootstrap_node.js:150:9)                                                                                                                         
    at bootstrap_node.js:508:3                                                                                                                                   ```

@EnMod looks like you're trying to use spike 1.0 on a pre 1.0 project here -- this has nothing to do with windows

EnMod commented

Strangely enough, using Spike on a Linux VM with the same project gives no issues whatsoever. Not sure if that's worth looking into or not but thought I'd add. A fresh project is working fine on Windows so it looks like everything should be good ๐ŸŽ‰

So, chances are you have an older version of spike installed on that linux machine. Run npm i spike -g then run the project again and you'll get the same error.

You can pick up a migration guide here if you want to move the older project to be compatible with v1, it's not super tough: https://gist.github.com/jescalan/8e39596765c66a192d00c2684437bf57