Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

npm ERR! code ELIFECYCLE #434

Open
ManyaoLi opened this issue Dec 28, 2021 · 2 comments
Open

npm ERR! code ELIFECYCLE #434

ManyaoLi opened this issue Dec 28, 2021 · 2 comments

Comments

@ManyaoLi
Copy link

When I run the codes:

buildPath <- tempdir()
platform <- "win"
arch <- "x64"
electricShine::electrify(app_name = "my_App", 
                         short_description = "My demo application",
                         semantic_version = "1.0.0", 
                         build_path = buildPath, 
                         cran_like_url = "https://cran.r-project.org", 
                         function_name = "run_app", 
                         git_host = "github", 
                         git_repo = "chasemc/demoApp@8426481", 
                         package_install_opts = list(type = "binary", dependencies = c("Depends", "Imports")), 
                         nodejs_version = "v10.16.0",
                         nodejs_path = file.path("F:/nodejs/node-v10.16.0-win-x64"))

The console printed:

Installing your Shiny package into electricShine framework.
Downloading GitHub repo chasemc/demoApp@8426481
rlang       (NA -> 0.4.12 ) [CRAN]
glue        (NA -> 1.6.0  ) [CRAN]
fastmap     (NA -> 1.1.0  ) [CRAN]
rappdirs    (NA -> 0.3.3  ) [CRAN]
R6          (NA -> 2.5.1  ) [CRAN]
fs          (NA -> 1.5.2  ) [CRAN]
base64enc   (NA -> 0.1-3  ) [CRAN]
digest      (NA -> 0.6.29 ) [CRAN]
jquerylib   (NA -> 0.1.4  ) [CRAN]
sass        (NA -> 0.4.0  ) [CRAN]
jsonlite    (NA -> 1.7.2  ) [CRAN]
htmltools   (NA -> 0.5.2  ) [CRAN]
magrittr    (NA -> 2.0.1  ) [CRAN]
later       (NA -> 1.3.0  ) [CRAN]
Rcpp        (NA -> 1.0.7  ) [CRAN]
promises    (NA -> 1.2.0.1) [CRAN]
lifecycle   (NA -> 1.0.1  ) [CRAN]
ellipsis    (NA -> 0.3.2  ) [CRAN]
cachem      (NA -> 1.0.6  ) [CRAN]
bslib       (NA -> 0.3.1  ) [CRAN]
commonmark  (NA -> 1.7    ) [CRAN]
withr       (NA -> 2.4.3  ) [CRAN]
crayon      (NA -> 1.4.2  ) [CRAN]
sourcetools (NA -> 0.1.7  ) [CRAN]
fontawesome (NA -> 0.2.2  ) [CRAN]
xtable      (NA -> 1.8-4  ) [CRAN]
mime        (NA -> 0.12   ) [CRAN]
httpuv      (NA -> 1.6.4  ) [CRAN]
shiny       (NA -> 1.7.1  ) [CRAN]
Installing 29 packages: rlang, glue, fastmap, rappdirs, R6, fs, base64enc, digest, jquerylib, sass, jsonlite, htmltools, magrittr, later, Rcpp, promises, lifecycle, ellipsis, cachem, bslib, commonmark, withr, crayon, sourcetools, fontawesome, xtable, mime, httpuv, shiny
试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/rlang_0.4.12.zip'
Content type 'application/zip' length 1202241 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/glue_1.6.0.zip'
Content type 'application/zip' length 173678 bytes (169 KB)
==================================================
downloaded 169 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/fastmap_1.1.0.zip'
Content type 'application/zip' length 215453 bytes (210 KB)
==================================================
downloaded 210 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/rappdirs_0.3.3.zip'
Content type 'application/zip' length 58795 bytes (57 KB)
==================================================
downloaded 57 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/R6_2.5.1.zip'
Content type 'application/zip' length 84262 bytes (82 KB)
==================================================
downloaded 82 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/fs_1.5.2.zip'
Content type 'application/zip' length 607609 bytes (593 KB)
==================================================
downloaded 593 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/base64enc_0.1-3.zip'
Content type 'application/zip' length 43156 bytes (42 KB)
==================================================
downloaded 42 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/digest_0.6.29.zip'
Content type 'application/zip' length 266596 bytes (260 KB)
==================================================
downloaded 260 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/jquerylib_0.1.4.zip'
Content type 'application/zip' length 525850 bytes (513 KB)
==================================================
downloaded 513 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/sass_0.4.0.zip'
Content type 'application/zip' length 3639397 bytes (3.5 MB)
==================================================
downloaded 3.5 MB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/jsonlite_1.7.2.zip'
Content type 'application/zip' length 544687 bytes (531 KB)
==================================================
downloaded 531 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/htmltools_0.5.2.zip'
Content type 'application/zip' length 347338 bytes (339 KB)
==================================================
downloaded 339 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/magrittr_2.0.1.zip'
Content type 'application/zip' length 235980 bytes (230 KB)
==================================================
downloaded 230 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/later_1.3.0.zip'
Content type 'application/zip' length 860076 bytes (839 KB)
==================================================
downloaded 839 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/Rcpp_1.0.7.zip'
Content type 'application/zip' length 3263551 bytes (3.1 MB)
==================================================
downloaded 3.1 MB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/promises_1.2.0.1.zip'
Content type 'application/zip' length 2320061 bytes (2.2 MB)
==================================================
downloaded 2.2 MB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/lifecycle_1.0.1.zip'
Content type 'application/zip' length 123111 bytes (120 KB)
==================================================
downloaded 120 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/ellipsis_0.3.2.zip'
Content type 'application/zip' length 49208 bytes (48 KB)
==================================================
downloaded 48 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/cachem_1.0.6.zip'
Content type 'application/zip' length 78979 bytes (77 KB)
==================================================
downloaded 77 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/bslib_0.3.1.zip'
Content type 'application/zip' length 5038587 bytes (4.8 MB)
==================================================
downloaded 4.8 MB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/commonmark_1.7.zip'
Content type 'application/zip' length 265478 bytes (259 KB)
==================================================
downloaded 259 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/withr_2.4.3.zip'
Content type 'application/zip' length 217472 bytes (212 KB)
==================================================
downloaded 212 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/crayon_1.4.2.zip'
Content type 'application/zip' length 157963 bytes (154 KB)
==================================================
downloaded 154 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/sourcetools_0.1.7.zip'
Content type 'application/zip' length 691391 bytes (675 KB)
==================================================
downloaded 675 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/fontawesome_0.2.2.zip'
Content type 'application/zip' length 1529209 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/xtable_1.8-4.zip'
Content type 'application/zip' length 706647 bytes (690 KB)
==================================================
downloaded 690 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/mime_0.12.zip'
Content type 'application/zip' length 48094 bytes (46 KB)
==================================================
downloaded 46 KB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/httpuv_1.6.4.zip'
Content type 'application/zip' length 1695953 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

试开URL’https://cran.r-project.org/bin/windows/contrib/4.1/shiny_1.7.1.zip'
Content type 'application/zip' length 4232648 bytes (4.0 MB)
==================================================
downloaded 4.0 MB

package 'rlang' successfully unpacked and MD5 sums checked
package 'glue' successfully unpacked and MD5 sums checked
package 'fastmap' successfully unpacked and MD5 sums checked
package 'rappdirs' successfully unpacked and MD5 sums checked
package 'R6' successfully unpacked and MD5 sums checked
package 'fs' successfully unpacked and MD5 sums checked
package 'base64enc' successfully unpacked and MD5 sums checked
package 'digest' successfully unpacked and MD5 sums checked
package 'jquerylib' successfully unpacked and MD5 sums checked
package 'sass' successfully unpacked and MD5 sums checked
package 'jsonlite' successfully unpacked and MD5 sums checked
package 'htmltools' successfully unpacked and MD5 sums checked
package 'magrittr' successfully unpacked and MD5 sums checked
package 'later' successfully unpacked and MD5 sums checked
package 'Rcpp' successfully unpacked and MD5 sums checked
package 'promises' successfully unpacked and MD5 sums checked
package 'lifecycle' successfully unpacked and MD5 sums checked
package 'ellipsis' successfully unpacked and MD5 sums checked
package 'cachem' successfully unpacked and MD5 sums checked
package 'bslib' successfully unpacked and MD5 sums checked
package 'commonmark' successfully unpacked and MD5 sums checked
package 'withr' successfully unpacked and MD5 sums checked
package 'crayon' successfully unpacked and MD5 sums checked
package 'sourcetools' successfully unpacked and MD5 sums checked
package 'fontawesome' successfully unpacked and MD5 sums checked
package 'xtable' successfully unpacked and MD5 sums checked
package 'mime' successfully unpacked and MD5 sums checked
package 'httpuv' successfully unpacked and MD5 sums checked
package 'shiny' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\HP\AppData\Local\Temp\Rtmp0UsOpc\downloaded_packages
Running `R CMD build`...
* checking for file 'C:\Users\HP\AppData\Local\Temp\Rtmp0UsOpc\remotes95069dc1a1f\chasemc-demoApp-8426481/DESCRIPTION' ... OK
* preparing 'demoApp':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
Omitted 'LazyData' from DESCRIPTION
* building 'demoApp_1.0.18.tar.gz'
* installing *source* package 'demoApp' ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (demoApp)
Finshed: Installing your Shiny package into electricShine framework
Successfully created C:/Users/HP/AppData/Local/Temp/RtmpyiPgQQ/my_App/package.json
Looking for nodejs...
...found nodejs executable.
Checking if nodejs executable is functional...
...found a functional nodejs v10.16.0 at: F:/nodejs/node-v10.16.0-win-x64/node.exe.
Looking for npm...
Found npm v6.9.0 at: F:/nodejs/node-v10.16.0-win-x64/npm
Skipping install_nodejs(), nodejs alreagy installed.
Looking for npm...
Found npm v6.9.0 at: F:/nodejs/node-v10.16.0-win-x64/npm
Creating app...
Installing npm dependencies for the installation process. these are specfied in 'package.json'. Also this step can take a few minutes.
Microsoft Windows [版本 10.0.19042.1415]
(c) Microsoft Corporation。保留所有权利。

C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ>cd "C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ/my_App" && "F:/nodejs/node-v10.16.0-win-x64/npm" install --scripts-prepend-node-path
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

> electron-chromedriver@11.0.0 install C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\my_App\node_modules\electron-chromedriver
> node ./download-chromedriver.js

(node:15236) ExperimentalWarning: The fs.promises API is experimental

> core-js@2.6.12 postinstall C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\my_App\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> electron@11.1.1 postinstall C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\my_App\node_modules\electron
> node install.js

RequestError: read ECONNRESET
    at ClientRequest.request.once.error (C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\my_App\node_modules\got\source\request-as-event-emitter.js:178:14)
    at Object.onceWrapper (events.js:286:20)
    at ClientRequest.emit (events.js:203:15)
    at ClientRequest.origin.emit.args (C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\my_App\node_modules\@szmarczak\http-timer\source\index.js:37:11)
    at TLSSocket.socketErrorListener (_http_client.js:392:9)
    at TLSSocket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN friendly-errors-webpack-plugin@1.7.0 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.5.6 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.5.6 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@11.1.1 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@11.1.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Roaming\npm-cache\_logs\2021-12-28T12_36_03_397Z-debug.log

C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\my_App>0
Building your Electron app.
Microsoft Windows [版本 10.0.19042.1415]
(c) Microsoft Corporation。保留所有权利。

C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ>cd "C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ/my_App" && "F:/nodejs/node-v10.16.0-win-x64/npm" run release --scripts-prepend-node-path

> my_App@1.0.0 release C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\my_App
> npm test && webpack --config=build/webpack.app.config.js --env=production && electron-builder


> my_App@1.0.0 test C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\my_App
> npm run unit && npm run e2e


> my_App@1.0.0 preunit C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\my_App
> webpack --config=build/webpack.unit.config.js --env=test --display=none

error: unknown option '--display=none'
[webpack-cli] Run 'webpack --help' to see available commands and options
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! my_App@1.0.0 preunit: `webpack --config=build/webpack.unit.config.js --env=test --display=none`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the my_App@1.0.0 preunit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Roaming\npm-cache\_logs\2021-12-28T12_36_06_402Z-debug.log
npm ERR! Test failed.  See above for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my_App@1.0.0 release: `npm test && webpack --config=build/webpack.app.config.js --env=production && electron-builder`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the my_App@1.0.0 release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Roaming\npm-cache\_logs\2021-12-28T12_36_06_431Z-debug.log

C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\my_App>0
You should now have both a transferable and distributable installer Electron app.
Warning messages:
1: In base::dir.create(install_r_to_path) :
  'C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\my_App\app' already exist
2: In dir.create(new_path) :
  'C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\electricShine' already exist
3: In dir.create(new_path) :
  'C:\Users\HP\AppData\Local\Temp\RtmpyiPgQQ\electricShine\templib' already `exist`

And it did not generate any .exe program
image
What should I do? I am appreciated to hear the answer.

@phineas-pta
Copy link

did you try another nodejs version ? for e.g. version 14 work best for me, ver 12 and 16 don't

@ManyaoLi
Copy link
Author

did you try another nodejs version ? for e.g. version 14 work best for me, ver 12 and 16 don't

Thanks for your suggestion. I have tried the latest node.js version and version 14, but it dosent work. Maybe other issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants