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

moodle-plugin-ci install fails: "grunt ignorefiles" wants a newer nodejs version #115

Open
dionysius opened this issue May 17, 2020 · 6 comments

Comments

@dionysius
Copy link
Contributor

$ moodle-plugin-ci install
 5/8 [=================>----------]  62% 29 secs [Install npm dependencies]
In ProcessHelper.php line 97:
                                                                               
  The command "grunt ignorefiles" failed.                                      
                                                                               
  Exit Code: 1(General error)                                                  
                                                                               
  Working directory: /home/travis/build/moodle                                 
                                                                               
  Output:                                                                      
  ================                                                             
  Fatal error: Node version not satisfied. Require >=14.0.0 <15.0.0, version   
  installed: 8.9.4�                                                            
                                                                               
                                                                               
  Error Output:                                                                
  ================                                                             
                                                                               

Probably needed to update to a newer nodejs version and make the codebase compatible to it

@ewallah
Copy link

ewallah commented May 17, 2020

Change

  • nvm install 8.9
  • nvm use 8.9
    into
  • nvm install 14.2.0
  • nvm use 14.2.0
    in your .travis.yml file MDL-66109

@dionysius
Copy link
Contributor Author

Thank you @ewallah. Gonna try this out.

The https://github.com/blackboard-open-source/moodle-plugin-ci/blob/master/.travis.dist.yml still suggests 8.9

@dionysius
Copy link
Contributor Author

Confirm, setting node to v14.2.0 works pretty good. I now only get a compilation error only in MOODLE_36_STABLE: https://travis-ci.org/github/frankkoch/moodle-mod_studentquiz/builds/688327102. All the others are fine: MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE

@sammarshallou
Copy link

I get the same failure on MOODLE_36_STABLE with auth_saml2 (not my plugin, I'm just working on it atm) https://travis-ci.org/github/sammarshallou/moodle-auth_saml2/jobs/688465656

@sammarshallou
Copy link

The specific failure is from npm install:

Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.3/linux-x64-83_binding.node"

Then it tries to compile it from source, which results in a lot of output and eventual failure.

There is no linux-x64-83_binding.node in the sass releases downloads area; the highers number for 4.9.3 is linux-x64-64_binding.node. The first version that has an -83_binding.node is 4.14.0. (I know nothing about sass and don't know what the numbers relating to 'binding' are... Node version maybe...)

@sammarshallou
Copy link

After discussion with Andrew Nicols from Moodle HQ, I learned that the reason for this is basically that Moodle 3.6 is no longer in support, and therefore (unlike 3.5 LTS, 3.7, 3.8 and master) it still requires the old Node version.

In case it helps others, here is my pull request for auth_saml2 including a fixed Travis yml which selects different Node version for moodle version:
catalyst/moodle-auth_saml2#427

Andrew says the proper fix is to run 'nvm use' after downloading moodle files, and before running npm install. This should automatically use the correct version for the Moodle version under test. I think that happens inside the 'moodle-plugin-ci install -vvv' line, so it would need a change to moodle-plugin-ci.

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

3 participants