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

lint crashes in jenkins #227

Closed
loicsalou opened this issue Jan 24, 2018 · 6 comments
Closed

lint crashes in jenkins #227

loicsalou opened this issue Jan 24, 2018 · 6 comments
Labels

Comments

@loicsalou
Copy link

I have a monorepo setup which contains one app and one lib.
In my intelliJ everything is fine.
When building in Jenkins I get this:
[ponents_feature_turbo-table-ZC3DPPMI7TZW3Y3OGJWPKEZLAQTTAVIEOSXM7QYUCCUWJQ2I3PBA] Running shell script

  • npm run lint

[email protected] lint /var/lib/jenkins/workspace/ponents_feature_turbo-table-ZC3DPPMI7TZW3Y3OGJWPKEZLAQTTAVIEOSXM7QYUCCUWJQ2I3PBA
ng lint

module.js:472
throw err;
^

Error: Cannot find module '@angular-devkit/core'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/var/lib/jenkins/workspace/ponents_feature_turbo-table-ZC3DPPMI7TZW3Y3OGJWPKEZLAQTTAVIEOSXM7QYUCCUWJQ2I3PBA/node_modules/@angular-devkit/schematics/src/tree/virtual.js:10:16)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)

I tried various workarounds (upgrading to latest nx, angular/cli etc.) but nothing changes.
I will disable lint for now but I don't know if it's enough to let my build work and allow realeasing my library.

Any clue on this ?

@loicsalou
Copy link
Author

same issue when unit testing the code:
[Pipeline] sh
[ponents_feature_turbo-table-ZC3DPPMI7TZW3Y3OGJWPKEZLAQTTAVIEOSXM7QYUCCUWJQ2I3PBA] Running shell script

  • npm run test

[email protected] test /var/lib/jenkins/workspace/ponents_feature_turbo-table-ZC3DPPMI7TZW3Y3OGJWPKEZLAQTTAVIEOSXM7QYUCCUWJQ2I3PBA
ng test

module.js:472
throw err;
^

Error: Cannot find module '@angular-devkit/core'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/var/lib/jenkins/workspace/ponents_feature_turbo-table-ZC3DPPMI7TZW3Y3OGJWPKEZLAQTTAVIEOSXM7QYUCCUWJQ2I3PBA/node_modules/@angular-devkit/schematics/src/tree/virtual.js:10:16)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)

npm ERR! Linux 3.12.67-60.64.24-default
npm ERR! argv "/usr/bin/node" "/usr/local/bin/npm" "run" "test"
npm ERR! node v7.4.0
npm ERR! npm v4.1.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test: ng test
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script 'ng test'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the zas-web-components package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng test
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs zas-web-components
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls zas-web-components
npm ERR! There is likely additional logging output above.

@mcblum
Copy link

mcblum commented Jan 24, 2018

If I had to guess it's a Jenkins issue rather than an Nx issue. I just set up delpoys the other night with Jenkins and everything seemed to work. Is everything you need installed on your Jenkins box? Right version of node / npm and such?

@loicsalou
Copy link
Author

well I juste checked all this. Indeed node is quite old (7.4.0 and npm 4.1.1). No library globally installed.
Which version would you advise me ? should I take the latest or maybe the latest stable ?

Thanks

@mcblum
Copy link

mcblum commented Jan 25, 2018

@loicsalou whatever you need for your app. I somehow made a mistake and installed 9.4 the other day but nothing broke. I think Angular reports it wants something <=9? Give it an update and see if that fixes it.

@vsavkin
Copy link
Member

vsavkin commented Feb 19, 2018

One thing I recommend you to do is to add a preinstall script that will check the version of NPM or Yarn. The NPM engines property is essentially unusable for that, so I recommend you to have a custom scripts for that.

Closing this as this isn't an issue with Nx.

@vsavkin vsavkin closed this as completed Feb 19, 2018
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants