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

npm run lint:js --fix fails #1509

Closed
seezee opened this issue Nov 24, 2021 · 8 comments · Fixed by #1516
Closed

npm run lint:js --fix fails #1509

seezee opened this issue Nov 24, 2021 · 8 comments · Fixed by #1516

Comments

@seezee
Copy link

seezee commented Nov 24, 2021

npm ERR! errno 1
npm ERR! underscores@1.0.0 lint:js: `wp-scripts lint-js 'js/*.js'`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the underscores@1.0.0 lint:js script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Had a lot of trouble installing the Node files; solved by rolling back to Node v14.x.x for the project. But getting lots of errors, including this one.
@seezee
Copy link
Author

seezee commented Dec 2, 2021

Debug log:

1 verbose cli [
1 verbose cli   '/Users/myusername/.nvm/versions/node/v14.18.1/bin/node',
1 verbose cli   '/Users/myusername/.nvm/versions/node/v14.18.1/bin/npm',
1 verbose cli   'run',
1 verbose cli   'lint:js',
1 verbose cli   '--fix'
1 verbose cli ]
2 info using npm@6.14.15
3 info using node@v14.18.1
4 verbose run-script [ 'prelint:js', 'lint:js', 'postlint:js' ]
5 info lifecycle underscores@1.0.0~prelint:js: underscores@1.0.0
6 info lifecycle underscores@1.0.0~lint:js: underscores@1.0.0
7 verbose lifecycle underscores@1.0.0~lint:js: unsafe-perm in lifecycle true
8 verbose lifecycle underscores@1.0.0~lint:js: PATH: /Users/myusername/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/myusername/Local Sites/mysite/app/public/wp-content/themes/mytheme/node_modules/.bin:/Users/myusername/.nvm/versions/node/v14.18.1/bin::/Users/myusername/.composer/vendor/bin:/usr/local/opt/gettext/bin:/usr/local/opt/sqlite/bin:/Users/myusername/.pyenv/shims:/Users/myusername/.pyenv/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myusername/.composer/vendor/bin:/Users/myusername/wpcs/vendor/bin/phpcs:/Users/myusername/wpcs/vendor/bin/phpcbf:/usr/local/bin/npm:/usr/local/Cellar/colorist/0.1.17/bin/colorist:/usr/local/MacGPG2/bin:/Library/Apple/usr/bin:/Users/myusername/google-cloud-sdk/bin:/usr/local/opt/gettext/bin:/usr/local/opt/sqlite/bin:/Users/myusername/.pyenv/shims:/Users/myusername/.pyenv/bin:/Users/myusername/perl5/bin
9 verbose lifecycle underscores@1.0.0~lint:js: CWD: /Users/myusername/Local Sites/mysite/app/public/wp-content/themes/mytheme
10 silly lifecycle underscores@1.0.0~lint:js: Args: [ '-c', "wp-scripts lint-js 'js/*.js'" ]
11 silly lifecycle underscores@1.0.0~lint:js: Returned: code: 1  signal: null
12 info lifecycle underscores@1.0.0~lint:js: Failed to exec lint:js script
13 verbose stack Error: underscores@1.0.0 lint:js: `wp-scripts lint-js 'js/*.js'`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/Users/myusername/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:400:28)
13 verbose stack     at ChildProcess.<anonymous> (/Users/myusername/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:400:28)
13 verbose stack     at maybeClose (internal/child_process.js:1058:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
14 verbose pkgid underscores@1.0.0
15 verbose cwd /Users/myusername/Local Sites/mysite/app/public/wp-content/themes/mytheme
16 verbose Darwin 21.1.0
17 verbose argv "/Users/myusername/.nvm/versions/node/v14.18.1/bin/node" "/Users/myusername/.nvm/versions/node/v14.18.1/bin/npm" "run" "lint:js" "--fix"
18 verbose node v14.18.1
19 verbose npm  v6.14.15
20 error code ELIFECYCLE
21 error errno 1
22 error underscores@1.0.0 lint:js: `wp-scripts lint-js 'js/*.js'`
22 error Exit status 1
23 error Failed at the underscores@1.0.0 lint:js script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@seezee
Copy link
Author

seezee commented Dec 2, 2021

FWIW, lint:scss fails similarly.

@fabio-blanco
Copy link

fabio-blanco commented Dec 7, 2021

Hello @seeze, Underscores seems to be a little bit outdated (I've opened an issue about it #1511). The problems you are facing are probably related to outdated libraries. I've updated the project libraries in a fork called Esqueleto that I've made for my own use. Fell free to use it if you think it may help you.

@seezee
Copy link
Author

seezee commented Dec 7, 2021

Fabio, thank you. I'll have a look at your fork.

@goatlady
Copy link

goatlady commented Dec 7, 2021

I've updated the project libraries in a fork I've made for my own use. Fell free to use it if you think it may help you.

Cheers @fabio-blanco - I've been thinking about forking this project to apply the various npm fixes too - thanks for doing it so I don't need to! :)

@fabio-blanco
Copy link

Cheers @fabio-blanco - I've been thinking about forking this project to apply the various npm fixes too - thanks for doing it so I don't need to! :)

It is good to know it can be useful to more people. Now that I know that the Underscores project is no longer maintained, I will probably change the name of my fork and reorganize the sass sources to follow more atual recommendations from the actual versions of sass. A lot of things has changed and there is a lot of things outdated on the project.

@fabio-blanco
Copy link

fabio-blanco commented Dec 27, 2021

I have updated the link to reflect to the master of the forked project and to the new name Esqueleto.
The project is basically the same with the updated dependencies but I've added a script to help one starting up with the starter theme usage and I've also made some improvements on the readme.
And I've also made some changes to the sass files to update it to the new dart sass way of doing things and to improve organization.

@Ismail-elkorchi
Copy link
Contributor

Hi, everyone ! I have just updated the npm packages (#1516), which seems to resolve the issues reported here.

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

Successfully merging a pull request may close this issue.

4 participants