webpack-contrib/install-webpack-plugin

Warning for "spawnSync npm ENOENT"

schifred opened this issue · 0 comments

Hi!
Dependencies hasn't installed when I set process.env.NODE_ENV to "development" on Mac OS.

Installing underscore...
Installing underscore...
Installing underscore...
Installing underscore...
Hash: b6a12f64cf3c10156334
Version: webpack 3.5.5
Time: 5328ms
                               Asset       Size  Chunks                    Chunk Names
780cd4e05755d6fef36478d58314ef65.png  302 bytes          [emitted]         
3ec2904732c72b301eff663c0c54da80.png  414 bytes          [emitted]         
744113230af69bc819fac37c2346c46e.png  426 bytes          [emitted]  

After I written "console.log(output.error);" in src/Installer.js, the terminal displays as follows.

Installing underscore...
{ Error: spawnSync npm ENOENT
    at exports._errnoException (util.js:1020:11)
    at spawnSync (child_process.js:450:20)
    at Function.spawnSync [as sync] (/Users/alfred/Desktop/learning/plutarch/node_modules/npm-install-webpack-plugin/node_modules/cross-spawn/index.js:46:14)
    at Object.install (/Users/alfred/Desktop/learning/plutarch/node_modules/npm-install-webpack-plugin/src/installer.js:159:22)
    at NpmInstallPlugin.install (/Users/alfred/Desktop/learning/plutarch/node_modules/npm-install-webpack-plugin/src/plugin.js:73:15)
    at NpmInstallPlugin.<anonymous> (/Users/alfred/Desktop/learning/plutarch/node_modules/npm-install-webpack-plugin/src/plugin.js:193:12)
    at onError (/Users/alfred/Desktop/learning/plutarch/node_modules/enhanced-resolve/lib/Resolver.js:65:10)
    at loggingCallbackWrapper (/Users/alfred/Desktop/learning/plutarch/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at runAfter (/Users/alfred/Desktop/learning/plutarch/node_modules/enhanced-resolve/lib/Resolver.js:158:4)
    at innerCallback (/Users/alfred/Desktop/learning/plutarch/node_modules/enhanced-resolve/lib/Resolver.js:146:3)      

Will it be better to print this error?