FS#60826 - [cordova] 8.1.2-1 fails - need to remove experimental dedup from PKGBUILD

Attached to Project: Community Packages
Opened by Vasya Pupkin (shahid) - Friday, 16 November 2018, 15:23 GMT
Last edited by freswa (frederik) - Monday, 12 October 2020, 18:13 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

(SEE SOLUTION BELOW!)


Description:

Can't run cordova at all, in any directory, from any user, with or without any cmdline arguments, everytime it fails:

------------------------------------------------------
$ cordova
/usr/lib/node_modules/browserify/node_modules/acorn-dynamic-import/lib/inject.js:29
acorn.plugins.dynamicImport = function () {
^

TypeError: Cannot set property 'dynamicImport' of undefined
at Object.injectDynamicImport [as default] (/usr/lib/node_modules/browserify/node_modules/acorn-dynamic-import/lib/inject.js:29:31)
at Object.<anonymous> (/usr/lib/node_modules/browserify/node_modules/acorn-node/index.js:31:51)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/usr/lib/node_modules/browserify/node_modules/detective/index.js:1:75)
------------------------------------------------------


Solution:
1. I've commented all rm-rf lines in PKGBUILD (see fix.patch attached)
2. makepks -si
3. It 100% works fine. Possibly, some PKGBUILD deps (browserify, acorn, etc) became useless now.


Additional info:
* community/cordova 8.1.2-1
* community/browserify 16.2.3-1
* community/acorn 1:6.0.4-1
* community/nodejs 11.2.0-1
* Same problem with ~solution:
https://stackoverflow.com/questions/52858955/trouble-installing-acorn-dynamic-import-node-module-to-ionic-android-project/52976310#52976310


Steps to reproduce:
1. $ cordova
This task depends upon

Closed by  freswa (frederik)
Monday, 12 October 2020, 18:13 GMT
Reason for closing:  Fixed
Additional comments about closing:  cordova 10.0
Comment by Vasya Pupkin (shahid) - Friday, 16 November 2018, 15:25 GMT
Due to formatting problems, shell log file attached.
   log (1 KiB)
Comment by Sergi Almacellas Abellana (pokoli) - Friday, 30 November 2018, 11:05 GMT
I can confirm that the proposed solution fixes the issue.

P.D: There is a typo in the solution, makepks should be makepkg :)
Comment by Himadri Sekhar Roy (himadri) - Monday, 10 December 2018, 10:44 GMT
I have install the package cordova through pacman. How to apply this patch? Please let me know the steps
Comment by Vasya Pupkin (shahid) - Monday, 10 December 2018, 18:46 GMT
Himadri Sekhar Roy,

mkdir cordova
cd cordova
curl 'https://git.archlinux.org/svntogit/community.git/plain/trunk/PKGBUILD?h=packages/cordova' > PKGBUILD
curl 'https://git.archlinux.org/svntogit/community.git/plain/trunk/cordova.install?h=packages/cordova' > cordova.install
curl 'https://bugs.archlinux.org/task/60826?getfile=16991' > fix.patch
patch -p0 < fix.patch
makepkg -si

-OR- You can use AUR helpers to automate things (see https://wiki.archlinux.org/index.php/AUR_helpers)
$ yaourt -G cordova
$ cd cordova
$ curl fix.patch
...
Comment by Luca Weiss (z3ntu) - Thursday, 03 January 2019, 18:20 GMT
Could this please be fixed?
Comment by Andrei (amaaov) - Friday, 08 February 2019, 12:05 GMT
I confirm this, provided patch works fine.

yay -G cordova && cd cordova
curl 'https://bugs.archlinux.org/task/60826?getfile=16991' > fix.patch
cat fix.patch
patch -p0 < fix.patch
makepkg -si
Comment by Juan Francisco Cantero Hurtado (juanfra) - Friday, 03 May 2019, 21:29 GMT
Works for me. Please fix the package.

Loading...