Closed Olliebaba closed 5 years ago
Unfortunately we can't duplicate your issue using the same configuration that you provided us with. We've created a sample repo with your config.
Could you please try cloning the sample we've created and see if you have the same problem?
Are you using yarn
or npm
as your package manager?
Could you also please provide the full output of your Wallaby Console (including Wallaby version number)? The console output can be viewed by changing your console Output Channel to Wallaby.js Console.
@smcenlly - Your sample repo works on my machine. In fact, if I copy over the files/folder of my sample repo, it works. But for some reason, running it on my sample repo does not work. (even after forcing wallaby to rebuild and reinstalling node modules).
I have shared with you access to a private repo. This one's really got me scratching my head...
I am using NPM.
Wallaby console output:
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:project Wallaby Node version: v8.12.0
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:project Wallaby config: /Users/nemo/Desktop/wallaby-babel-import/wallaby.conf.js
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: jest.config.js
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: package.json
[Info] Started Wallaby.js Core v1.0.697
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: app/index.js
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: app/utils/index.js
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: app/__mocks__/fileMock.js
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: app/__mocks__/styleMock.js
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: app/utils/regex/index.js
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: app/utils/validators/index.js
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: app/utils/regex/common/index.js
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: app/utils/validators/string/index.js
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: app/utils/validators/string/mustBeAlphaNumeric/index.js
[Info] Wed, 12 Jun 2019 15:44:40 GMT wallaby:fs File added: app/utils/validators/string/mustBeAlphaNumeric/index.test.js
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:project File cache: /Users/nemo/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.128/projects/a102bfc4c722e12f
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:uiService Listening port 51235
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Parallelism for initial run: 6, for regular run: 3
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Starting run worker instance #0
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Starting run worker instance #1
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Starting run worker instance #2
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Starting run worker instance #3
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Starting run worker instance #4
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Starting run worker instance #5
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Web server is listening at 62160
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:project Re-instrumenting original file because its ID has changed
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:project Preparing to process app/utils/regex/index.js
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:project Starting processor pool (if not yet started)
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:project Re-instrumenting original file because its ID has changed
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:project Preparing to process app/utils/validators/index.js
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:project Starting processor pool (if not yet started)
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Started run worker instance (delayed) #0
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Started run worker instance (delayed) #1
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Started run worker instance (delayed) #3
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Started run worker instance (delayed) #2
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Started run worker instance (delayed) #5
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:workers Started run worker instance (delayed) #4
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:processor Running 1 processor(s) for app/utils/regex/index.js
[Info] Wed, 12 Jun 2019 15:44:41 GMT wallaby:processor Running 1 processor(s) for app/utils/validators/index.js
[Error] Browserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist`
[Error] Browserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist`
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:processor Finished running one processor for app/utils/regex/index.js
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Compiler did not set ranges for file [app/utils/regex/index.js]
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Processing compiled app/utils/regex/index.js
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Instrumenting app/utils/regex/index.js, via process pool: true
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:processor Finished running one processor for app/utils/validators/index.js
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Compiler did not set ranges for file [app/utils/validators/index.js]
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Processing compiled app/utils/validators/index.js
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Instrumenting app/utils/validators/index.js, via process pool: true
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:processor No preprocessors found for app/utils/validators/index.js
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Writing to disk and caching processed file app/utils/validators/index.js
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:processor No preprocessors found for app/utils/regex/index.js
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Writing to disk and caching processed file app/utils/regex/index.js
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Stopping process pool
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project File cache is up-to-date, starting full test run
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Running postprocessor
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:postprocessor New TypeScript language service is required
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:postprocessor TypeScript postprocessor will be removed because in 12 project files none were found by patterns: **/*.ts?(x)
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Postprocessor execution finished
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Postprocessor is removed as requested by itself
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Test run started; run priority: 3
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:project Running all tests
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:workers Starting test run, priority: 3
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:nodeRunner Starting sandbox [worker #0, session #rwhs1]
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:nodeRunner Preparing sandbox [worker #0, session #rwhs1]
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:nodeRunner Prepared sandbox [worker #0, session #rwhs1]
[Info] Wed, 12 Jun 2019 15:44:42 GMT wallaby:workers [worker #0, session #rwhs1] Running tests in sandbox
[Info] Wed, 12 Jun 2019 15:44:44 GMT wallaby:workers Sandbox (active) [rwhs1] error: TypeError: Cannot read property '_jasmineAdapter' of undefined
[Error] Runtime error: TypeError: Cannot read property '_jasmineAdapter' of undefined
[Error] at Runtime._execModule (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-runtime/build/index.js:888:13)
[Error] at Runtime._loadModule (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-runtime/build/index.js:577:12)
[Error] at Runtime.requireModule (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-runtime/build/index.js:433:10)
[Error] at config.setupFilesAfterEnv.forEach.path (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-jasmine2/build/index.js:186:55)
[Error] at Array.forEach (<anonymous>)
[Error] at /Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-jasmine2/build/index.js:186:31
[Error] at Generator.next (<anonymous>)
[Error] at asyncGeneratorStep (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-jasmine2/build/index.js:27:24)
[Error] at _next (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-jasmine2/build/index.js:47:9)
[Error] at /Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-jasmine2/build/index.js:52:7
[Error] at new Promise (<anonymous>)
[Error] at /Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-jasmine2/build/index.js:44:12
[Error] at _jasmine (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-jasmine2/build/index.js:206:19)
[Error] at jasmine2 (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-jasmine2/build/index.js:60:19)
[Error] at /Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-runner/build/runTest.js:385:24
[Error] at Generator.next (<anonymous>)
[Error] at asyncGeneratorStep (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-runner/build/runTest.js:161:24)
[Error] at _next (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-runner/build/runTest.js:181:9)
[Error] at <anonymous>
[Error] at process._tickCallback (internal/process/next_tick.js:189:7)
[Info] Wed, 12 Jun 2019 15:44:44 GMT wallaby:workers Failed to map the stack to user code, entry message: TypeError: Cannot read property '_jasmineAdapter' of undefined, stack: TypeError: Cannot read property '_jasmineAdapter' of undefined
[Info] at Object._jasmineAdapter (/Users/nemo/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.128/wallaby/runners/node/jest@0.4.3/jasmine2Initializer.js:14:2524)
[Info] at Runtime._execModule (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-runtime/build/index.js:888:13)
[Info] at Runtime._loadModule (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-runtime/build/index.js:577:12)
[Info] at Runtime.requireModule (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-runtime/build/index.js:433:10)
[Info] at Runtime.u._wallabyReplaced.c.requireModule (/Users/nemo/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.128/wallaby/runners/node/jest@0.4.3/initializer.js:14:25867)
[Info] at config.setupFilesAfterEnv.forEach.path (/Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-jasmine2/build/index.js:186:55)
[Info] at Array.forEach (<anonymous>)
[Info] at /Users/nemo/Desktop/wallaby-babel-import/node_modules/jest-jasmine2/build/index.js:186:31
[Info]
[Info] console.log: FAIL app/utils/validators/string/mustBeAlphaNumeric/index.test.js
[Info] console.log: ● Test suite failed to run
[Info] TypeError: Cannot read property '_jasmineAdapter' of undefined
[Info] at Object._jasmineAdapter (../../.vscode/extensions/wallabyjs.wallaby-vscode-1.0.128/wallaby/runners/node/jest@0.4.3/jasmine2Initializer.js:14:2524)
[Info] at Runtime.u._wallabyReplaced.c.requireModule (../../.vscode/extensions/wallabyjs.wallaby-vscode-1.0.128/wallaby/runners/node/jest@0.4.3/initializer.js:14:25867)
[Info] at Array.forEach (<anonymous>)
[Info] Wed, 12 Jun 2019 15:44:44 GMT wallaby:workers [rwhs1] Run 0 test(s), skipped 0 test(s)
[Info] Wed, 12 Jun 2019 15:44:44 GMT wallaby:workers [rwhs1] Sandbox is responsive, closing it
[Info] Wed, 12 Jun 2019 15:44:44 GMT wallaby:project Test run finished
[Info] Wed, 12 Jun 2019 15:44:44 GMT wallaby:project Processed console.log entries
[Info] Wed, 12 Jun 2019 15:44:44 GMT wallaby:project Processed loading sequences
[Info] Wed, 12 Jun 2019 15:44:44 GMT wallaby:project Processed executed tests
[Info] Wed, 12 Jun 2019 15:44:44 GMT wallaby:project Processed code coverage
[Info] Wed, 12 Jun 2019 15:44:44 GMT wallaby:project Test run result processed and sent to IDE
@Olliebaba - I have managed to duplicate and fix the problem but I still haven't uncovered the root cause. For some reason, there are some conflicts when loading jest
because the jest
packages exist in multiple places. I'm not sure yet why this is causing problems for wallaby. We've seen similar behavior before with version conflicts but so far I haven't identified any of these.
We're going to keep investigating the problem, but in the meantime, I can offer two ways to fix this:
1) Delete your node_modules
and package.json.lock
file and perform an npm install
. On my machine, this doesn't generate a package.json.lock
file. I assume that this is because the versions are explicitly set in package.json
.
2) run npm dedupe
on your project. On my machine, this moved some of the dependencies around and fixed the problem.
@smcenlly - Both of these solutions fix the issue for me. I didn't know about npm dedupe
. That's pretty rad. Thank you for looking at this!
@smcenlly - Would these solutions be helpful on the troubleshooting page?
Thanks for the suggestion, added to one of the troubleshooting sections:
Sometimes Wallaby can break due to node_module version conflicts. This can be a result of package.json.lock/yarn.lock conflicts, upgrading node.js versions, and sometimes conflicts between dependencies. If you recently added a new package, try removing the package and see if Wallaby starts working again. Also try deleting your node_modules folder, package.json.lock, yarn.lock files and then reinstall using your package manager.
Issue description or question
I'm getting
TypeError: Cannot read property '_jasmineAdapter' of undefined
and cannot find a solution based on other's issues. (reinstalling /node_modules/, deleting ~/.vscode/extensions/.../wallaby, etc)Wallaby.js configuration file
package.json
jest.config.js
jest.init.js
Code editor or IDE name and version
Visual Studio Code v1.35.0
OS name and version
macOS v10.14.5