Closed mathieucaroff closed 4 years ago
I tried using an intern@3 (intern@3.4.6) but to no avail.
I tried upgrading the typescript version (typescript@3.8.3).
Upgrading the typescript version worked.
Thanks for catching this! The problem is that Intern includes modern Node typings, and these use some TS features that aren't available in the version of TS the tutorial is currently using.
The tutorial completely fails form me with Node 10.15.3, on Windows.
Steps to reproduce
I have:
npm install
npm install --save-dev intern
types
array totsconfig.json
intern.json
npm test
Here's the output I get:
Expected behavior
The tutorial advertises intern should output:
Current behavior
Intern outputs the above error message, and nothing about any test.
Possible solution
The relevant part of the error message probably is the following:
so it looks like the issue is with
tsc
, and indeed runningnode node_modules/typescript/bin/tsc -p .
manually, or runningnpm run compile
produces the same 6 first lines (without the[0]
prefix).Furthermore, running
npm run compile
on a clean repository clone, afternpm install
, but beforenpm install --save-dev intern
doesn't produce any error. So I suspect this is of compatibility between the tutorial version and the currentintern
version.It turns out that the install log of
npm install --save-dev intern
contains the following line:The problem likely comes from the above missing peer dependency.
Environment
Intern version: 4.8.0 Node version: 10.15.3 NPM version: 6.4.1 Browser version: N/A