Error at phase of Compiling assets when deploy with edeliver

When I try to deploy, the deployment stops at phase assets compilation:

-----> Compiling assets

A remote command failed on:

  deploy@x.x.x.x

Output of the command is shown above and the command executed
on that host is printed below for debugging purposes:

FAILED with exit status 2:

       [ -f ~/.profile ] && source ~/.profile
       set -e
       cd '/tmp/edeliver/myapp/builds'/assets
       node_modules/.bin/webpack --mode production --silent

but there is not error details about it, how can diagnose the error?
I tried to ssh into the server, and run the command above node_modules/.bin/webpack --mode production --silent in assets directory, but it passed without error…

Have you tried without --silent?

Also by "passing without error” do you mean there was no visible output in the terminal, assets have been created and the command exited with an exit code of 0? Or was it just no visible output, but you didn’t check the exit code?

Oh, I just noticed that --silent, I’ve removed it, now I got this error:

ERROR in ./js/app.js
Module build failed: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in /tmp/edeliver/ngspice/builds/assets/node_modules/@babel/helper-compilation-targets/package.json
    at applyExports (internal/modules/cjs/loader.js:524:9)
    at resolveExports (internal/modules/cjs/loader.js:541:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:661:22)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:963:27)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (/tmp/edeliver/ngspice/builds/assets/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/tmp/edeliver/ngspice/builds/assets/node_modules/@babel/preset-env/lib/debug.js:8:33)
    at Module._compile (/tmp/edeliver/ngspice/builds/assets/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (/tmp/edeliver/ngspice/builds/assets/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/tmp/edeliver/ngspice/builds/assets/node_modules/@babel/preset-env/lib/index.js:11:14)
    at Module._compile (/tmp/edeliver/ngspice/builds/assets/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (/tmp/edeliver/ngspice/builds/assets/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at requireModule (/tmp/edeliver/ngspice/builds/assets/node_modules/@babel/core/lib/config/files/plugins.js:165:12)
    at loadPreset (/tmp/edeliver/ngspice/builds/assets/node_modules/@babel/core/lib/config/files/plugins.js:83:17)
    at createDescriptor (/tmp/edeliver/ngspice/builds/assets/node_modules/@babel/core/lib/config/config-descriptors.js:154:9)
    at /tmp/edeliver/ngspice/builds/assets/node_modules/@babel/core/lib/config/config-descriptors.js:109:50
    at Array.map (<anonymous>)
    at createDescriptors (/tmp/edeliver/ngspice/builds/assets/node_modules/@babel/core/lib/config/config-descriptors.js:109:29)
    at createPresetDescriptors (/tmp/edeliver/ngspice/builds/assets/node_modules/@babel/core/lib/config/config-descriptors.js:101:10)
    at presets (/tmp/edeliver/ngspice/builds/assets/node_modules/@babel/core/lib/config/config-descriptors.js:47:19)
    at mergeChainOpts (/tmp/edeliver/ngspice/builds/assets/node_modules/@babel/core/lib/config/config-chain.js:320:26)
    at /tmp/edeliver/ngspice/builds/assets/node_modules/@babel/core/lib/config/config-chain.js:283:7
    at Generator.next (<anonymous>)
    at buildRootChain (/tmp/edeliver/ngspice/builds/assets/node_modules/@babel/core/lib/config/config-chain.js:120:29)
    at buildRootChain.next (<anonymous>)
    at loadPrivatePartialConfig (/tmp/edeliver/ngspice/builds/assets/node_modules/@babel/core/lib/config/partial.js:95:62)
    at loadPrivatePartialConfig.next (<anonymous>)
 @ multi ./js/app.js

A remote command failed on:

  deploy@172.105.87.109

Output of the command is shown above and the command executed
on that host is printed below for debugging purposes:

FAILED with exit status 2:

       [ -f ~/.profile ] && source ~/.profile
       set -e
       cd '/tmp/edeliver/ngspice/builds'/assets
       node_modules/.bin/webpack --mode production

@NobbZ that has solved the issue: https://github.com/nodejs/node/issues/32107#issuecomment-595392684

1 Like