Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'exports' of undefined #163

Open
atomkirk opened this issue Feb 20, 2019 · 1 comment
Open

Cannot read property 'exports' of undefined #163

atomkirk opened this issue Feb 20, 2019 · 1 comment

Comments

@atomkirk
Copy link

All our tests pass on multiple macOS machines, and on semaphore-ci, but when we try to build and run tests on a new debian box, we get this error in loader.js:143

not ok 1320 Chrome 72.0 - TestLoader Failures: zipbooks/tests/unit/utils/request-log-test: could not be loaded
    ---
        actual: >
            null
        stack: >
            TypeError: Cannot read property 'exports' of undefined
                at Module._reify (http://localhost:45371/assets/vendor.js:148:59)
                at Module.reify (http://localhost:45371/assets/vendor.js:135:27)
                at Module.exports (http://localhost:45371/assets/vendor.js:109:10)
                at Module._reify (http://localhost:45371/assets/vendor.js:148:59)
                at Module.reify (http://localhost:45371/assets/vendor.js:135:27)
                at Module.exports (http://localhost:45371/assets/vendor.js:109:10)
                at Module._reify (http://localhost:45371/assets/vendor.js:148:59)
                at Module.reify (http://localhost:45371/assets/vendor.js:135:27)
                at Module.exports (http://localhost:45371/assets/vendor.js:109:10)
                at requireModule (http://localhost:45371/assets/vendor.js:32:18)
        message: >
            Died on test #1     at TestLoader.moduleLoadFailure (http://localhost:45371/assets/test-support.js:11150:24)
                at TestLoader.<anonymous> (http://localhost:45371/assets/test-support.js:10463:16)
                at TestLoader.require (http://localhost:45371/assets/test-support.js:10451:27)
                at TestLoader.loadModules (http://localhost:45371/assets/test-support.js:10443:16)
                at loadTests (http://localhost:45371/assets/test-support.js:11174:22)
                at start (http://localhost:45371/assets/test-support.js:10857:33)
                at Module.callback (http://localhost:45371/assets/tests.js:20710:25): Cannot read property 'exports' of undefined
        Log: |
            { type: 'info',
              text: '\'Unit assertion failed and test has been paused for inspection.\'\n' }
            { type: 'error',
              text: '{ module: \'TestLoader Failures\',\n  name: \'zipbooks/tests/unit/utils/request-log-test: could not be loaded\',\n  result: false,\n  message: \'Died on test #1     at TestLoader.moduleLoadFailure (http://localhost:45371/assets/test-support.js:11150:24)\\n    at TestLoader.<anonymous> (http://localhost:45371/assets/test-support.js:10463:16)\\n    at TestLoader.require (http://localhost:45371/assets/test-support.js:10451:27)\\n    at TestLoader.loadModules (http://localhost:45371/assets/test-support.js:10443:16)\\n    at loadTests (http://localhost:45371/assets/test-support.js:11174:22)\\n    at start (http://localhost:45371/assets/test-support.js:10857:33)\\n    at Module.callback (http://localhost:45371/assets/tests.js:20710:25): Cannot read property \\\'exports\\\' of undefined\',\n  actual: null,\n  testId: \'8629d10a\',\n  negative: false,\n  runtime: 1,\n  todo: false,\n  source: \'TypeError: Cannot read property \\\'exports\\\' of undefined\\n    at Module._reify (http://localhost:45371/assets/vendor.js:148:59)\\n    at Module.reify (http://localhost:45371/assets/vendor.js:135:27)\\n    at Module.exports (http://localhost:45371/assets/vendor.js:109:10)\\n    at Module._reify (http://localhost:45371/assets/vendor.js:148:59)\\n    at Module.reify (http://localhost:45371/assets/vendor.js:135:27)\\n    at Module.exports (http://localhost:45371/assets/vendor.js:109:10)\\n    at Module._reify (http://localhost:45371/assets/vendor.js:148:59)\\n    at Module.reify (http://localhost:45371/assets/vendor.js:135:27)\\n    at Module.exports (http://localhost:45371/assets/vendor.js:109:10)\\n    at requireModule (http://localhost:45371/assets/vendor.js:32:18)\' }\n' }

We cannot find any information or have any guesses what might be causing this error.

ember-cli: 3.1.4
node: 8.5.0
os: linux x64

This felt like a bug to me since the exact same code works on a different operating system, but let me know if I'm wrong and I'll seek help in a more appropriate place

@oliverlangan
Copy link

I am seeing this now too, only when upgrading to the latest Ember Data. With 3.27 it works fine; with 3.28 I get this error.

All of my tests run locally just fine; they fail in CI and in docker. Moreover, if I run them in docker with ember test -s, the Chromium browser that attaches from within the container fails; but I can connect from a browser on the host machine and the tests will load and all pass. I thought perhaps it was the version of Chromium, but I downloaded the same version (albeit for macOS) and it also works correctly from the host machine.

@atomkirk Did you ever discover any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants