rauschma / exploring-js

20 stars 0 forks source link

Chapter: Getting started with exercises #2

Open rauschma opened 6 years ago

Ngugi1 commented 6 years ago

Small typo:

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

rauschma commented 5 years ago

@Ngugi1 Thanks, fixed now!

matt-wiese commented 3 years ago

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!

rauschma commented 3 years ago

@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.

matt-wiese commented 3 years ago

@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

rauschma commented 3 years ago

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

Does that work or not?

matt-wiese commented 3 years ago

@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

rauschma commented 3 years ago

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
BehdadEs commented 3 years ago

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.

rauschma commented 3 years ago

@BehdadEs:

BehdadEs commented 3 years ago

@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: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: 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

rauschma commented 3 years ago

node -v output: 6.14.11

OK, that’s the problem:

BehdadEs commented 3 years ago

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