impatient-js icon indicating copy to clipboard operation
impatient-js copied to clipboard

Chapter: Getting started with exercises

Open rauschma opened this issue 7 years ago • 14 comments
trafficstars

(I deleted comments that reported issues that are fixed now.)

rauschma avatar Jun 26 '18 16:06 rauschma

Small typo:

Page 77, Getting Started With Quizzes and Exercises, First Paragraph, Last Sentence, Last word should read: them not theem

Ngugi1 avatar Aug 16 '18 10:08 Ngugi1

@Ngugi1 Thanks, fixed now!

rauschma avatar Mar 23 '19 18:03 rauschma

Hey @rauschma I'm encountering an error when trying to use/configure AVA in Atom and I'm reaching out here as AVA is referencing your package.json in ./impatient-js-code 2020-06-23;


@ test C:\Users\c-matt.wiese\Google Drive\JS\impatient-js-code 2020-06-23 ava --verbose --match "!*#bonus" "installation_test.mjs"

× Enhancement compilation must be configured in AVA’s Babel options. npm ERR! Test failed. See above for more details.


I've used npm to install esm, babel, http-server, and isisomorphic-fetch. Please help!

matt-wiese avatar Dec 17 '20 21:12 matt-wiese

@matt-wiese: It does work if you run npm t from a terminal app, right?

Alas, my knowledge of AVA is limited. It looks like you are running an older version – IIRC, enhancement compilation was something that older versions did/required: https://github.com/avajs/ava/issues/2376

If that’s not it, you may have to ask the AVA team.

rauschma avatar Dec 17 '20 22:12 rauschma

@matt-wiese: It does work if you run npm t from a terminal app, right?

Alas, my knowledge of AVA is limited. It looks like you are running an older version – IIRC, enhancement compilation was something that older versions did/required: avajs/ava#2376

If that’s not it, you may have to ask the AVA team.

yep that's what I tried running as well. And FWIW I am on Win10 so I'm using Atom for a terminal app. Node JS is installed, ran through the simple ava install available from their repo. I am using AVA v3.14

matt-wiese avatar Dec 17 '20 22:12 matt-wiese

@matt-wiese: What happens if you do the following in a normal terminal:

  • Download the exercises
  • Install AVA locally via npm install inside the unpacked directory with the exercises
  • Invoke npm t for an exercise

Does that work or not?

rauschma avatar Dec 17 '20 23:12 rauschma

@matt-wiese: What happens if you do the following in a normal terminal:

  • Download the exercises
  • Install AVA locally via npm install inside the unpacked directory with the exercises
  • Invoke npm t for an exercise

Does that work or not?

I performed these steps exactly and it seems each .mjs had an uncaught exception or error thrown in test

matt-wiese avatar Dec 17 '20 23:12 matt-wiese

I performed these steps exactly and it seems each .mjs had an uncaught exception or error thrown in test

That is expected (as long as it’s: “missing module” and “comparison failed”) – the exercises are about making these exceptions go away.

The one test that should succeed, is:

npm t installation_test.mjs

rauschma avatar Dec 19 '20 19:12 rauschma

Hey @rauschma, I wanted to test exercise files and followed the instructions in README but when I try to test the codes with installation_test.mjs I get this message: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'assert' imported from D:\JS\exercies\installation_test.mjs at packageResolve (internal/modules/esm/resolve.js:655:9) at moduleResolve (internal/modules/esm/resolve.js:696:18) at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:810:11) at Loader.resolve (internal/modules/esm/loader.js:86:40) at Loader.getModuleJob (internal/modules/esm/loader.js:230:28) at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:56:40) at link (internal/modules/esm/module_job.js:55:36) npm ERR! Test failed. See above for more details.

BehdadEs avatar Feb 27 '21 20:02 BehdadEs

@BehdadEs:

  • This is the ES2020 edition, right?
  • npm install went well, I take it?
  • What’s the output if you run node -v

rauschma avatar Feb 27 '21 20:02 rauschma

@rauschma No, I'm learning fron ES2021 edition npm install went well with no issue I think npm install output:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 125 packages from 83 contributors and audited 126 packages in 2.527s

18 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

node -v outpu: 6.14.11

BehdadEs avatar Feb 28 '21 08:02 BehdadEs

node -v output: 6.14.11

OK, that’s the problem:

  • You need a version of node that’s at least 15.5.1 (see README.txt)
  • You can download an installer here: https://nodejs.org/

rauschma avatar Feb 28 '21 10:02 rauschma

node -v output: 6.14.11

OK, that’s the problem:

  • You need a version of node that’s at least 15.5.1 (see README.txt)
  • You can download an installer here: https://nodejs.org/

It worked! I was using TLS version and didn't pay attention to the version number . Thanks

BehdadEs avatar Feb 28 '21 11:02 BehdadEs