question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can not create temp direcotry when run Jest from WebStorm

See original GitHub issue

When trying to run Jest test from WebStorm with Jest configuration every time get an error:

[jest-html-reporters]: Param attach error, can not save as a image, pic / (Home Page) should load without error - test google 1 log failed.

console.error
    [Error: ENOENT: no such file or directory, open '/Users/mc92/Work/PuppTry/node_modules/jest-html-reporters/temp/images/16119399801940.6875269435668176.jpg'] {
      errno: -2,
      code: 'ENOENT',
      syscall: 'open',
      path: '/Users/mc92/Work/PuppTry/node_modules/jest-html-reporters/temp/images/16119399801940.6875269435668176.jpg'
    }

Not created temp directory

But if run test form console using npm run test or npx run test - works well and create a report.

I would like it to always work (even run from WebStorm)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sirdircommented, Apr 27, 2021

@roman-petrov, for now, you can use JEST_HTML_REPORTERS_TEMP_DIR_PATH env variable. Set it explicitly before running tests, at least it may solve your issue with running tests on CI env.

0reactions
Hazyzhcommented, May 2, 2021

Hi all, a new version(2.1.5) has released. we will change to using the system’s temp folder as this reporter’s temp attach folder. It will resolve issues like this, thanks to @sirdir’s great idea and contribution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run/Debug Configuration: Jest - WebStorm - JetBrains
In this dialog, create configurations for running Jest tests. ... However, if you do not want to share the .idea directory, you can...
Read more >
Running a single test in WebStorm using Jest - Stack Overflow
I'm adding screenshots to clarify what is happening exactly now when I run a single test. Tests · Configuration. Is there a way...
Read more >
Cannot run Jest tests from Webstorm · Issue #2314 · nrwl/nx
To run within the webstorm you need to provide the IDE environment variable under Run/Debug Configuration . Hope this issue can be fixed...
Read more >
ts-node - npm
ts-node is a TypeScript execution engine and REPL for Node.js. It JIT transforms TypeScript into JavaScript, enabling you to directly execute ...
Read more >
Run/Debug Configuration: Jest - Help | IntelliJ IDEA - JetBrains
The search is performed in the file system upwards from the working directory. If no appropriate package.json file is found, then a Jest...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found