majestic icon indicating copy to clipboard operation
majestic copied to clipboard

Opps, Something went wrong. Check the terminal for exact error message!

Open alexgorbatchev opened this issue 6 years ago • 13 comments

Is this a bug report or a feature request?

Bug

Version Info

  • Version of Majestic: 1.4.1
  • Version of Jest: 24.7.1
  • Version of Node: 10.13.0
  • Operating System: OSX

Reproduction Repo

Run npx majestic in a folder where yarn jest works fine and has jest.config.js, then I just see this:

image

There's no error message in the terminal and one error in dev console. My jest.config.js looks like this and the project is a yarn monorepo.

module.exports = require('common-module/jest')(`${__dirname}/packages`);

alexgorbatchev avatar May 07 '19 22:05 alexgorbatchev

Would you please run majestic with the --debug flag and share a screenshot or the output?

Raathigesh avatar May 08 '19 00:05 Raathigesh

Here's the output from --debug

❯ npx majestic --debug
npx: installed 31 in 5.923s
⚡  Majestic v1.4.1 is running at http://localhost:4000
ℹ Majestic configuration from Package.json:  {}                                      Config Resolver 11:08:03
ℹ Path of resolved Jest script:  .../node_modules/jest
ℹ Resolved Majestic config : {                                                       Config Resolver 11:08:03
  jestScriptPath: '".../node_modules/jest/bin/jest.js"',
  args: [],
  env: {}
}
ℹ Error occured while obtaining Jest cofiguration for coverage report                        Results 11:08:04

alexgorbatchev avatar May 08 '19 18:05 alexgorbatchev

If I try to disable coverage, there's no visible change in the output.

alexgorbatchev avatar May 08 '19 18:05 alexgorbatchev

That's unfortunate. Would you be able to provide a sample repository?

Raathigesh avatar May 13 '19 11:05 Raathigesh

Same error

xavierbriole avatar May 15 '19 13:05 xavierbriole

same issue +1

jukbot avatar Aug 24 '19 06:08 jukbot

@Raathigesh - Could you please let me what are the details needed please? I am facing the same issue too, so i can share the same

GowthamX avatar Mar 09 '20 14:03 GowthamX

@Raathigesh - works now. Please ignore. Added the below in package.json which is given in Issue-87. :+1:

"majestic": { "jestScriptPath": ".\node_modules\jest\bin\jest.js", "args": [ "test" ] },

GowthamX avatar Mar 09 '20 15:03 GowthamX

I'm also getting the same error

Resolved Majestic config : {                                                                                                          
  jestScriptPath: '"........./node_modules/jest/bin/jest.js"',
  args: [
    'test:dev'
  ],
  env: {}
}
ℹ Error occured while obtaining Jest cofiguration for coverage report SyntaxError: Unexpected token ● in JSON at position 0

gabycasper007 avatar Jul 16 '20 00:07 gabycasper007

I'm also getting the same error

Resolved Majestic config : {                                                                                                          
  jestScriptPath: '"........./node_modules/jest/bin/jest.js"',
  args: [
    'test:dev'
  ],
  env: {}
}
ℹ Error occured while obtaining Jest cofiguration for coverage report SyntaxError: Unexpected token ● in JSON at position 0

solved with a yarn install

gabycasper007 avatar Jul 16 '20 01:07 gabycasper007

I'm still having this issue when using a basic NextJS setup. Tried all of the solutions above and nothing helped.

dwaynelavon avatar Aug 24 '22 16:08 dwaynelavon

I'm still having this issue on my React Native storybook project

MatiSera avatar Feb 28 '23 14:02 MatiSera

Same error with a basic Next.js setup. Jest is running good, but majestic just throw me a ℹ Error occured while obtaining Jest cofiguration for coverage report SyntaxError: Unexpected token ● in JSON at position 0 Any workaround ?

navalex avatar Jul 31 '23 14:07 navalex