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.

jest-haste-map: @providesModule naming collision warnings in docker

See original GitHub issue

I might have found a bug issue with running jest iside node:alpine container

What is the current behavior?

docker run -it node:alpine /bin/sh

yarn add jest

jest

there are messages with @providesModule naming collision for all packages

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: har-schema
  Paths: /usr/local/share/.cache/yarn/v1/npm-har-schema-2.0.0-a94c2224ebcac04782a0d9035521f24735b7ec92/package.json collides with /usr/local/share/.cache/yarn/v1/npm-har-schema-1.0.5-d263135f43307c02c602afc8fe95970c0151369e/package.json
...
This warning is caused by a @providesModule declaration with the same name across two different files.
No tests found
In /
  6609 files checked.
  testMatch: **/__tests__/**/*.js?(x),**/?(*.)(spec|test).js?(x) - 27 matches
  testPathIgnorePatterns: /node_modules/ - 6609 matches
Pattern:  - 0 matches
error Command failed with exit code 1.

What is the expected behavior?

In docker jest should work like on the host OS (OSX) where it works without errors.

Docker for mac: Version 17.12.0-ce-mac49 (21995)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
virecommented, Feb 9, 2018

Well it’s not a bug it’s because the rootDir is / in the container

2reactions
adamchenweicommented, Jan 8, 2019

@vire I am having same issue with jest on bamboo. I dont really understand Well it's not a bug it's because the rootDir is / in the container means, would you elaborate on the actual fix the replacing something that actually fixed it? thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - jest-haste-map: @providesModule naming collision
When configuring CI on Jenkins, we are getting a lot of @providesModule naming collision warnings and the build eventually fails.
Read more >
nodejs-mobile-react-native-redmagic - npm package - Snyk
The react-native packager monitors the project's folder for javascript packages and may throw a " Error: jest-haste-map: @providesModule naming ...
Read more >
Open Source Used In Socio 1.0 - Cisco
This document contains licenses and notices for open source software used in this product.
Read more >
[Solved]-Error: jest-haste-map - appsloveworld
Coding example for the question Error: jest-haste-map: @providesModule naming collision when using a local dependency-React Native.
Read more >
React Native @providesModule naming collision error - Medium
jest-haste-map : @providesModule naming collision: ... This warning is caused by a @providesModule declaration with the same name across two ...
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