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

Tests are failing on Node 8.3 #657

Closed
stefan-guggisberg opened this issue Mar 18, 2019 · 8 comments · Fixed by #683
Closed

Tests are failing on Node 8.3 #657

stefan-guggisberg opened this issue Mar 18, 2019 · 8 comments · Fixed by #683
Labels
bug Something isn't working

Comments

@stefan-guggisberg
Copy link
Contributor

Description
helix-cli doesn't function properly on Node version 8.3.

To Reproduce
Steps to reproduce the behavior:

  1. nvm use 8.3
  2. npm test
  175 passing (2m)
  4 pending
  25 failing

  1) Integration test for build
       build command succeeds and produces files:
     Cannot find module './helper.js'
  

  2) Integration test for demo + up command
       up command delivers expected output with simple demo:
     Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/stefan/projects/helix-cli/test/testDemoUp.js)
  

  3) Integration test for demo + up command
       up command delivers expected output with full demo:
     Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/stefan/projects/helix-cli/test/testDemoUp.js)
  

  4) hlx deploy (Integration)
       Dry-Running works:
     Cannot find module './helper.js'
  

  5) Generated Action Tests
       Testing asynchelpx_html
         "before all" hook: Run Parcel programmatically on asynchelpx_html for "correct output files have been generated":
     Cannot find module './asynchelpx_html.pre.js'
  

  6) Generated Action Tests
       Testing helpx_html
         "before all" hook: Run Parcel programmatically on helpx_html for "correct output files have been generated":
     Cannot find module './helpx_html.pre.js'
  

  7) Generated Action Tests
       Testing logger_html
         "before all" hook: Run Parcel programmatically on logger_html for "correct output files have been generated":
     Cannot find module './logger_html.pre.js'
  

  8) Generated Action Tests
       Testing async_html
         "before all" hook: Run Parcel programmatically on async_html for "correct output files have been generated":
     Cannot find module './async_html.pre.js'
  

  9) Generated Action Tests
       Testing return_async_html
         "before all" hook: Run Parcel programmatically on return_async_html for "correct output files have been generated":
     Cannot find module './return_async_html.pre.js'
  

  10) Generated Action Tests
       Testing promise_html
         "before all" hook: Run Parcel programmatically on promise_html for "correct output files have been generated":
     Cannot find module './promise_html.pre.js'
  

  11) Generated Action Tests
       Testing return_promise_html
         "before all" hook: Run Parcel programmatically on return_promise_html for "correct output files have been generated":
     Cannot find module './return_promise_html.pre.js'
  

  12) Generated Action Tests
       Testing require_html
         "before all" hook: Run Parcel programmatically on require_html for "correct output files have been generated":
     Cannot find module './helpers.js'
  

  13) Generated Action Tests
       Testing require_noext_html
         "before all" hook: Run Parcel programmatically on require_noext_html for "correct output files have been generated":
     Cannot find module './helpers'
  

  14) Generated Action Tests
       Testing simple_html
         "before all" hook: Run Parcel programmatically on simple_html for "correct output files have been generated":
     Cannot find module './simple_html.pre.js'
  

  15) Generated Action Tests
       Testing return_simple_html
         "before all" hook: Run Parcel programmatically on return_simple_html for "correct output files have been generated":
     Cannot find module './return_simple_html.pre.js'
  

  16) Generated Action Tests
       Testing xml
         "before all" hook: Run Parcel programmatically on xml for "correct output files have been generated":
     Cannot find module './helpers.js'
  

  17) Generated Action Tests
       Testing async_xml
         "before all" hook: Run Parcel programmatically on async_xml for "correct output files have been generated":
     Cannot find module './helpers.js'
  

  18) hlx package (Integration)
       package create correct package:
     Cannot find module './helper.js'
  

  19) hlx package (Integration)
       package does not recreate existing package:
     Cannot find module './helper.js'
  

  20) hlx publish (Integration)
       "before each" hook for "Publish Strains on an existing Service Config":
     TypeError: fs.copyFile is not a function
      at Context.beforeEach (test/testPublishCmd.js:146:14)
      at <anonymous>

  21) Integration test for up command
       up command succeeds and can be stopped:
     Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/stefan/projects/helix-cli/test/testUpCmd.js)
  

  22) Integration test for up command
       up command delivers correct response.:
     Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/stefan/projects/helix-cli/test/testUpCmd.js)
  

  23) Integration test for up command
       up command delivers correct response with different host.:
     Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/stefan/projects/helix-cli/test/testUpCmd.js)
  

  24) Integration test for up command
       up command writes default config.:
     Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/stefan/projects/helix-cli/test/testUpCmd.js)
  

  25) Integration test for up command
       up command delivers modified sources and delivers correct response.:
     Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/stefan/projects/helix-cli/test/testUpCmd.js)

Expected behavior
npm test succeeds on node 8.3.

Version:
hlx >0.13.8

@stefan-guggisberg stefan-guggisberg added the bug Something isn't working label Mar 18, 2019
@tripodsan
Copy link
Contributor

why would someone use node 8.3? LTS is 8.15.1

@stefan-guggisberg
Copy link
Contributor Author

why would someone use node 8.3? LTS is 8.15.1

We don't know what version people are using on their machines or in their docker images. The README just says "You need Node 8 or newer.".

It's a bug. The issue was introduced by a recent change (0.13.8 is not affected). We should either fix it or be explicit what exact versions we're supporting and add appropriate version checks and error messages.

@tripodsan
Copy link
Contributor

given the fact, that node 8.3 is almost 2 years old, and that node 8.x will be EOL end of this year, I don't think we should try to fix this problem. Also, I understand "You need Node 8 or newer." as, you need the latest 8.x node...

My suggestion is:

  • update the docs to require a 'recent' node. let's say node 8.15.0 :-)

@stefan-guggisberg
Copy link
Contributor Author

update the docs to require a 'recent' node. let's say node 8.15.0 :-)

and add appropriate version checks and error messages...

I'd rather remove Node 8 support and require Node 10.

@stefan-guggisberg
Copy link
Contributor Author

Some more details:

@stefan-guggisberg
Copy link
Contributor Author

This is a regression of issue #397, specifically this commit: 0528466

We should fix it IMO.

@tripodsan
Copy link
Contributor

We should fix it IMO.

we can't really fix it without implementing the entire resolve logic ourselves. I don't think its' worth it.

I think:

  • supported, deprecated: node [8.9, 9.0)
  • supported: node [10.0, 11.0)

@trieloff, @stefan-guggisberg, @kptdobe, @rofe, @koraa WDYT?

@tripodsan
Copy link
Contributor

please comment on: #683

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants