VoTT icon indicating copy to clipboard operation
VoTT copied to clipboard

Unexepected Token ELIFECYCLE npm syntax error when running npm ci on VoTT to correctely identify cause and fix(correct)

Open goodengineer opened this issue 5 years ago • 4 comments

Hello.

Does anyone know and can help/clarify to fix next when running npm ci:

...

[email protected] postinstall D:\VOTT\VoTT\node_modules\node-sass node scripts/build.js

Binary found at D:\VOTT\VoTT\node_modules\node-sass\vendor\win32-x64-59\binding.node Testing binary Binary is fine

[email protected] postinstall D:\VOTT\VoTT\node_modules\ejs node --harmony ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

[email protected] postinstall D:\VOTT\VoTT\node_modules\electron node install.js

[email protected] postinstall D:\VOTT\VoTT electron-builder install-app-deps

D:\VOTT\VoTT\node_modules\electron-builder\node_modules\fs-extra\lib\mkdirs\make-dir.js:86 } catch { ^

SyntaxError: Unexpected token { at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:152:10) at Module._compile (module.js:624:28) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3) at Module.require (module.js:604:17) at require (internal/module.js:11:18) at Object. (D:\VOTT\VoTT\node_modules\electron-builder\node_modules\fs-extra\lib\mkdirs\index.js:3:44) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall: electron-builder install-app-deps npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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\User\AppData\Roaming\npm-cache_logs\2020-06-16T07_54_58_395Z-debug.log

?

Kind Regards, Paul. Screenshot (1659) Screenshot (1660)

goodengineer avatar Jun 16 '20 08:06 goodengineer

Make sure you are using node 10.x

https://nodejs.org/dist/latest-v10.x/

series8217 avatar Jul 03 '20 01:07 series8217

Trying to resolve it:

Why next?:

D:\VOTT\Latest\rel01July2020\VoTT>node -v v10.21.0

D:\VOTT\Latest\rel01July2020\VoTT>npm -v 6.14.5

D:\VOTT\Latest\rel01July2020\VoTT>npm ci npm WARN prepare removing existing node_modules/ before installation npm WARN tarball tarball data for [email protected] (sha512-ni3q7QTfQNWHNWuyn5x3FZu6GnQZv+TFnfgk5++svqleKEhHGqS1mIaKsh7x5pBX6NFXU3/+ktk98wA/AW4EXw==) seems to be corrupted. Trying one more time. npm ERR! code EPERM npm ERR! syscall unlink npm ERR! path D:\VOTT\Latest\rel01July2020\VoTT\node_modules\app-builder-bin\linux\arm64\app-builder npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, unlink 'D:\VOTT\Latest\rel01July2020\VoTT\node_modules\app-builder-bin\linux\arm64\app-builder' npm ERR! { [Error: EPERM: operation not permitted, unlink 'D:\VOTT\Latest\rel01July2020\VoTT\node_modules\app-builder-bin\linux\arm64\app-builder'] npm ERR! cause: npm ERR! { Error: EPERM: operation not permitted, unlink 'D:\VOTT\Latest\rel01July2020\VoTT\node_modules\app-builder-bin\linux\arm64\app-builder' npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: npm ERR! 'D:\VOTT\Latest\rel01July2020\VoTT\node_modules\app-builder-bin\linux\arm64\app-builder' }, npm ERR! stack: npm ERR! 'Error: EPERM: operation not permitted, unlink 'D:\VOTT\Latest\rel01July2020\VoTT\node_modules\app-builder-bin\linux\arm64\app-builder'', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: npm ERR! 'D:\VOTT\Latest\rel01July2020\VoTT\node_modules\app-builder-bin\linux\arm64\app-builder' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2020-07-03T07_49_58_247Z-debug.log

?

goodengineer avatar Jul 03 '20 07:07 goodengineer

Getting similar issue as @goodengineer

NOTE: I am using node version as 10.22.0 and which is using 6.14.6 version of npm.

Below are the steps to regenerate the issue:

  1. Git clone
  2. npm ci

Getting below error:

$ npm ci npm WARN prepare removing existing node_modules/ before installation npm WARN tarball tarball data for @fortawesome/[email protected] (sha1-6wlqSURtZJvcjJDwRAAwbv98M8I=) seems to be corrupted. Trying one more time. npm WARN tarball tarball data for [email protected] (sha512-dWb3fB/wBAiQloteKlf+j9Nl2VLe6BMZgTEt6hpeTt0t9TwtkeU+2v2NBYONZaF4FZATfMiIKozhWpc2HmLW1g==) seems to be corrupted. Trying one more time. npm ERR! code EPERM npm ERR! syscall unlink npm ERR! path D:\Personal Projects\VoTT\node_modules\reactstrap\dist\reactstrap.full.js.map npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, unlink 'D:\Personal Projects\VoTT\node_modules\reactstrap\dist\reactstrap.full.js.map' npm ERR! { [Error: EPERM: operation not permitted, unlink 'D:\Personal Projects\VoTT\node_modules\reactstrap\dist\reactstrap.full.js.map'] npm ERR! cause: npm ERR! { Error: EPERM: operation not permitted, unlink 'D:\Personal Projects\VoTT\node_modules\reactstrap\dist\reactstrap.full.js.map' npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: npm ERR! 'D:\Personal Projects\VoTT\node_modules\reactstrap\dist\reactstrap.full.js.map' }, npm ERR! stack: npm ERR! 'Error: EPERM: operation not permitted, unlink 'D:\Personal Projects\VoTT\node_modules\reactstrap\dist\reactstrap.full.js.map'', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: npm ERR! 'D:\Personal Projects\VoTT\node_modules\reactstrap\dist\reactstrap.full.js.map' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm WARN tarball tarball data for [email protected] (sha1-/oEBxGqhI/g1NSPr3PVzDCrkk+U=) seems to be corrupted. Trying one more time.

VoTTError

shubh10482 avatar Aug 07 '20 03:08 shubh10482

Getting the same issue too.

ghost avatar Sep 17 '20 09:09 ghost