Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move admin settings to src/ folder #2331

Merged
merged 12 commits into from
Oct 21, 2019

Conversation

nickvergessen
Copy link
Member

No description provided.

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Copy link
Member

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get this error when building:

ERROR in ./src/views/CollaborationView.vue
Module build failed (from ./node_modules/eslint-loader/dist/cjs.js):
TypeError: Cannot read property 'forEach' of undefined

And make all and make dev-setup also won't work:

rm -f js/*
rm: cannot remove 'js/admin': Is a directory
Makefile:44: recipe for target 'clean' failed
make: *** [clean] Error 1

btw I appreoved by mistake xD

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen
Copy link
Member Author

the make clean I fixed. For the other thing... no idea what this is.

@nickvergessen
Copy link
Member Author

Error resolving webpackConfig { Error: Cannot find module '/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/nextcloud-vue-collections/webpack.common.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.exports.resolve (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-import-resolver-webpack/index.js:66:27)
    at v2 (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-module-utils/resolve.js:94:23)
    at withResolver (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-module-utils/resolve.js:99:16)
    at fullResolve (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-module-utils/resolve.js:116:22)
    at Function.relative (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-module-utils/resolve.js:61:10)
    at remotePath (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-plugin-import/lib/ExportMap.js:401:30)
    at captureDependency (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-plugin-import/lib/ExportMap.js:442:15)
    at /home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-plugin-import/lib/ExportMap.js:480:7
    at Array.forEach (<anonymous>)
    at Function.ExportMap.parse (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-plugin-import/lib/ExportMap.js:461:12)
    at Function.ExportMap.for (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-plugin-import/lib/ExportMap.js:353:25)
    at Function.ExportMap.get (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-plugin-import/lib/ExportMap.js:315:23)
    at processBodyStatement (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-plugin-import/lib/rules/namespace.js:67:47)
    at Array.forEach (<anonymous>)
    at Program (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint-plugin-import/lib/rules/namespace.js:96:14)
    at listeners.(anonymous function).forEach.listener (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/util/safe-emitter.js:45:58)
    at Array.forEach (<anonymous>)
    at Object.emit (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/util/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/util/node-event-generator.js:280:22)
    at NodeEventGenerator.enterNode (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/util/node-event-generator.js:294:14)
    at CodePathAnalyzer.enterNode (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:632:23)
    at nodeQueue.forEach.traversalInfo (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/linter.js:752:32)
    at Array.forEach (<anonymous>)
    at runRules (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/linter.js:747:15)
    at Linter._verifyWithoutProcessors (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/linter.js:899:31)
    at preprocess.map.textBlock (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/linter.js:955:35)
    at Array.map (<anonymous>)
    at Linter.verify (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/linter.js:954:42)
    at Linter.verifyAndFix (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/linter.js:1047:29)
    at processText (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/cli-engine.js:197:32)
    at CLIEngine.executeOnText (/home/nickv/Nextcloud/18/server/appsbabies/spreed/node_modules/eslint/lib/cli-engine.js:690:40) code: 'MODULE_NOT_FOUND' }

@juliusknorr
Copy link
Member

juliusknorr commented Oct 21, 2019

@nickvergessen Looks like this is an issue of the eslint-plugin-import-webpack package that is for some reason trying to resolve a webpack file in the nextcloud-vue-collections package. Looks related to import-js/eslint-plugin-import#666

I would suggest to just use the nextcloud eslint config (which actually was there already for the vue/ folder but is removed in this PR https://github.com/nextcloud/spreed/blob/1743f056f3e46cf1f4d20ade5345a1bfb07d52d1/vue/.eslintrc.js)

Otherwise you could enforce the webpack resolver to just take your apps config into account:

diff --git a/.eslintrc.js b/.eslintrc.js
index 02f83b17..833c00ed 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,3 +1,5 @@
+const path = require('path')
+
 module.exports = {
        root: true,
        env: {
@@ -31,7 +33,7 @@ module.exports = {
        settings: {
                'import/resolver': {
                        webpack: {
-                               config: 'webpack.common.js'
+                               config: path.resolve('webpack.common.js')
                        },
                        node: {
                                paths: ['src'],

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen
Copy link
Member Author

Oh right, I just forgot to adjust the eslintrc file after installing the package. That also solves the issue.

@nickvergessen nickvergessen merged commit 403be5e into master Oct 21, 2019
@delete-merged-branch delete-merged-branch bot deleted the techdebt/noid/move-admin-settings-to-src-folder branch October 21, 2019 08:30
@nickvergessen nickvergessen mentioned this pull request Oct 21, 2019
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants