Closed adover closed 5 years ago
It looks like you have conflicting jest
versions in some of your packages.
Have deleted and reinstalled node modules.
Did you delete package-lock.json
first? If not, could you please delete and try to install again?
Did you also do the same on your laptop (i.e. delete package-lock.json
and reinstall node modules)?
If you're still experiencing the problem, can you please send us package-lock.json
from both machines?
Another thing to try is our new automatic configuration for Jest v24+. For Jest v24+, if your tests work through the command line, you should be able to run Wallaby without any configuration. You can read more about how to do this in our docs.
Hey @smcenlly ,
I just deleted and reinstalled node modules and package-lock but with no success. I also tried the auto config but got the error Looks like none of the paths specified in your files/tests list exist in ...
I don't have my laptop to hand but here is the package lock from my work machine package-lock.json.txt
I have put together this sample repo with your configs: https://github.com/ArtemGovorov/wallaby-2187, it seems to work (both config and auto config).
Looks like none of the paths specified in your files/tests list exist in ...
, what is the full path it was complaining about?Also, on your work machine Jest may be trying to resolve dependencies from some other folders, try checking the following folders and remove any found node_modules
subfolder in them:
- `c:\Users\USERNAME\.vscode\extensions\`
- `c:\Users\USERNAME\.vscode\`
- `c:\Users\USERNAME\`
- `c:\Users\`
- `c:\`
Hey @ArtemGovorov , that seems to work on my local machine so it must mean it's project based. I'll clear out my jest.config files and see if that yields any results
You may also like to try cloning your project to a fresh directory on the same machine and seeing if that fixes your problem.
Hey guys, Tried all of the above but still no luck. Still getting the following
TypeError: Cannot read property '_jasmineAdapter' of undefined
at Runtime._execModule (.\node_modules\jest-runtime\build\index.js:867:68)
at Runtime._loadModule (.\node_modules\jest-runtime\build\index.js:577:12)
at Runtime.requireModule (.\node_modules\jest-runtime\build\index.js:433:10)
at config.setupFilesAfterEnv.forEach.path (.\node_modules\jest-jasmine2\build\index.js:187:55)
at Array.forEach (<anonymous>)
at .\node_modules\jest-jasmine2\build\index.js:187:31
at Generator.next (<anonymous>)
at asyncGeneratorStep (.\node_modules\jest-jasmine2\build\index.js:27:24)
at _next (.\node_modules\jest-jasmine2\build\index.js:47:9)
at .\node_modules\jest-jasmine2\build\index.js:52:7
at new Promise (<anonymous>)
at .\node_modules\jest-jasmine2\build\index.js:44:12
at _jasmine (.\node_modules\jest-jasmine2\build\index.js:207:19)
at jasmine2 (.\node_modules\jest-jasmine2\build\index.js:60:19)
at .\node_modules\jest-runner\build\runTest.js:385:24
at Generator.next (<anonymous>)
at asyncGeneratorStep (.\node_modules\jest-runner\build\runTest.js:161:24)
at _next (.\node_modules\jest-runner\build\runTest.js:181:9)
at process._tickCallback (internal/process/next_tick.js:68:7)
This is with a fresh clone and install
I think I found the issue! I removed the "allowJS" flag from my tsconfigs and it came to life! Thanks for the help @ArtemGovorov and @smcenlly
Hopefully this will be of use to other people too :)
Great to hear that you solved your problem.
I was running into the same problem (without having allowJS
set at all) when using vs-code and auto-configuration without a wallaby.js file.
For me the solution was to create the wallaby.js file with the following contents:
module.exports = () => ({
autoDetect: true
});
@rryter This is interesting. Were you trying to run Wallaby auto-config without a wallaby.js from the same folder where you now have the module.exports = () => ({ autoDetect: true });
config? I'm asking because they should work identically (unless the folder was different).
It seems it just was a caching problem, I can not reproduce it anymore. Also Wallby.js Core was updated to Core v1.0.744 just before I had the chance to retry this. It now also works without the config file. 👍
Issue description or question
Getting the above error. Have deleted an reinstalled node modules. Funnily enough it works with the same config on my personal laptop, but not on my work machine.
Wallaby.js configuration file
package.json
Code editor or IDE name and version
Visual Studio Code v1.37.0
OS name and version
Windows 10