File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,15 +16,20 @@ function color(modifier, string) {
1616
1717console . log ( color ( 'info' , '▶️ Starting workshop setup...' ) )
1818
19- var error = spawnSync ( 'npx --version' , { shell : true } ) . stderr . toString ( ) . trim ( )
20- if ( error ) {
19+ var output = spawnSync ( 'npm --version' , { shell : true } ) . stdout . toString ( ) . trim ( )
20+ var outputParts = output . split ( '.' )
21+ var major = Number ( outputParts [ 0 ] )
22+ var minor = Number ( outputParts [ 1 ] )
23+ if ( major < 8 || ( major === 8 && minor < 16 ) ) {
2124 console . error (
2225 color (
2326 'danger' ,
24- '🚨 npx is not available on this computer. Please install npm@5.2.0 or greater' ,
27+ '🚨 npm version is ' +
28+ output +
29+ ' which is out of date. Please install npm@8.16.0 or greater' ,
2530 ) ,
2631 )
27- throw error
32+ throw new Error ( 'npm version is out of date' )
2833}
2934
3035var command =
You can’t perform that action at this time.
0 commit comments