Tasks: Make fails

Created on 31 Aug 2019  路  12Comments  路  Source: nextcloud/tasks

Make fails because browserslist-config-nextcloud is required but never requested:

ERROR in ./src/main.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /var/www/nextcloud/apps/tasks/src/main.js: Cannot find module 'browserslist-config-nextcloud' (While processing: "/var/www/nextcloud/apps/tasks/node_modules/@babel/preset-env/lib/index.js")
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.resolve (/var/www/nextcloud/apps/tasks/node_modules/v8-compile-cache/v8-compile-cache.js:166:23)
    at Object.loadQueries (/var/www/nextcloud/apps/tasks/node_modules/browserslist/node.js:116:35)
    at Function.select (/var/www/nextcloud/apps/tasks/node_modules/browserslist/index.js:951:26)
    at /var/www/nextcloud/apps/tasks/node_modules/browserslist/index.js:255:33
    at Array.reduce (<anonymous>)
    at resolve (/var/www/nextcloud/apps/tasks/node_modules/browserslist/index.js:237:18)
    at browserslist (/var/www/nextcloud/apps/tasks/node_modules/browserslist/index.js:361:16)
    at getTargets (/var/www/nextcloud/apps/tasks/node_modules/@babel/preset-env/lib/targets-parser.js:204:50)
    at _default (/var/www/nextcloud/apps/tasks/node_modules/@babel/preset-env/lib/index.js:132:46)
    at /var/www/nextcloud/apps/tasks/node_modules/@babel/helper-plugin-utils/lib/index.js:19:12
    at loadDescriptor (/var/www/nextcloud/apps/tasks/node_modules/@babel/core/lib/config/full.js:165:14)
    at cachedFunction (/var/www/nextcloud/apps/tasks/node_modules/@babel/core/lib/config/caching.js:33:19)
    at loadPresetDescriptor (/var/www/nextcloud/apps/tasks/node_modules/@babel/core/lib/config/full.js:235:63)
    at config.presets.reduce (/var/www/nextcloud/apps/tasks/node_modules/@babel/core/lib/config/full.js:77:21)
    at Array.reduce (<anonymous>)
    at recurseDescriptors (/var/www/nextcloud/apps/tasks/node_modules/@babel/core/lib/config/full.js:74:38)
    at loadFullConfig (/var/www/nextcloud/apps/tasks/node_modules/@babel/core/lib/config/full.js:108:6)
    at process.nextTick (/var/www/nextcloud/apps/tasks/node_modules/@babel/core/lib/transform.js:28:33)
    at process._tickCallback (internal/process/next_tick.js:61:11)

The Tasks app itself does not need this package, so I suspect nextcloud-vue or one of the packages used there needs this package but never installs it (it misses in package.json). Maybe @skjnldsv or @ChristophWurst could have a look.

The issue was originally reported by @jakobroehrl by email. I couldn't reproduce it first, but after one of the latest package bumps it happens on my machine too.

bug

All 12 comments

Hum, no, we don't use it on nc-vue :thinking:
@ChristophWurst ?

make works for me, as well as npm i and npm run build

This is really weird. At first I couldn鈥檛 reproduce it either, but since yesterday I see it on my machine as well. And I didn鈥檛 find any occurrence of the string browserslist-config-nextcloud in the Nextcloud folder as well. I am a bit lost atm.

And I didn鈥檛 find any occurrence of the string browserslist-config-nextcloud in the Nextcloud folder as well. I am a bit lost atm.

I checked the same. Couldn't find it either. Do you have an global npm dependencies that might interfere with this? Does the build process of this app assume anything global?

I found, that the problem lies in these lines https://github.com/nextcloud/server/blob/master/package.json#L85-L87 of Nextcloud server plus that I don't have browserslist-config-nextcloud installed for server (I didn't run npm install after updating to NC17).

When I remove it from package.json of server or install browserslist-config-nextcloud in server, make works again for the Tasks app. I still don't understand why this interferes with eachother, though.

Good question!
Though you can add this as well since we should aim towards the same browserlist support :)

It already is the same, comparing https://github.com/ChristophWurst/browserslist-config-nextcloud/blob/master/browserlist.config.js#L3-L4 and https://github.com/nextcloud/tasks/blob/master/.babelrc.js#L11 馃槈

But yes, adding browserslist-config-nextcloud would make it more explicit and immediately solve this issue here.

@raimund-schluessler yes, but the goal is to be able to change it without creating 35 prs :grin:
So having external configs outsourced to npm packages is what we aim to (same goes from lots of our configs that we'll slowly update)

Shouldn't be browserslist-config-nextcloud be in the nextcloud organization then? Would make it feel a bit more official (to me). 馃槈

@raimund-schluessler blame @ChristophWurst :see_no_evil:

Anyway, PR is in #583.

@raimund-schluessler blame @ChristophWurst see_no_evil

Blame the ones that still don't give me admin perms on the orga so I cannot move the repo :P

Was this page helpful?
0 / 5 - 0 ratings

Related issues

raimund-schluessler picture raimund-schluessler  路  5Comments

jakobroehrl picture jakobroehrl  路  5Comments

raimund-schluessler picture raimund-schluessler  路  8Comments

janvonde picture janvonde  路  8Comments

enboig picture enboig  路  9Comments