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

build errors (eslint, ast, gjs) #27

Open
yogo1212 opened this issue Jul 16, 2021 · 2 comments
Open

build errors (eslint, ast, gjs) #27

yogo1212 opened this issue Jul 16, 2021 · 2 comments

Comments

@yogo1212
Copy link

In a fresh clone, just running make leaves me with this error:

£ make
npx eslint -c ./.eslintrc.js ./glassygnome@emiapwil/*.js
npx: installed 118 in 13.857s

Oops! Something went wrong! :(

ESLint: 7.30.0

ESLint couldn't find the plugin "eslint-plugin-gjs".

(The package "eslint-plugin-gjs" was not found when loaded as a Node module from the directory "/home/.../git/glassy-gnome".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm install eslint-plugin-gjs@latest --save-dev

The plugin "eslint-plugin-gjs" was referenced from the config file in "--config".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

make: *** [Makefile:25: lint] Error 2

After doing that, there's another error:

£ make
npx eslint -c ./.eslintrc.js ./glassygnome@emiapwil/*.js
npx: installed 118 in 11.68s

Oops! Something went wrong! :(

ESLint: 7.30.0

Error: Failed to load plugin 'gjs' declared in '--config': Cannot find module 'eslint/lib/ast-utils'
Referenced from: /home/.../git/glassy-gnome/.eslintrc.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/.../.npm/_npx/18511/lib/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/home/.../git/glassy-gnome/node_modules/eslint-plugin-gjs/lib/rules/translation-strings.js:8:18)
    at Module._compile (/home/.../.npm/_npx/18511/lib/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
make: *** [Makefile:25: lint] Error 2
@yogo1212
Copy link
Author

is eslint-utils the right thing to move to?

@emiapwil
Copy link
Owner

I didn't get ESlint to work properly before but after a little digging I managed to make it work. I think using a linter can still be useful to make sure the code is compatible with the general coding style. Please see the updated documentation here.

In case you don't have to set up ESLint, please run make package. It will not run the linter.

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

No branches or pull requests

2 participants