Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

v3.0.5 broken (possibly related to loader-utils) #377

Closed
JamesGuthrie opened this issue Feb 22, 2017 · 3 comments
Closed

v3.0.5 broken (possibly related to loader-utils) #377

JamesGuthrie opened this issue Feb 22, 2017 · 3 comments

Comments

@JamesGuthrie
Copy link

Sorry about the title not being very descriptive. It appears as though the following commit has broken atl for our usage: 9fbc5b3

The error I'm getting is:

TypeError: Cannot read property 'instance' of null at compiler (<project root>/node_modules/awesome-typescript-loader/src/index.ts:44:31) at Object.loader (<project root>/node_modules/awesome-typescript-loader/src/index.ts:14:18) at WEBPACK_CORE_LOADER_EXECUTION (<project root>/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71) at runSyncOrAsync (<project root>/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93) at nextLoader (<project root>/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3) at <project root>/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15 at context.callback (<project root>/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14) at Object.module.exports (<project root>/node_modules/tslint-loader/index.js:112:3) at WEBPACK_CORE_LOADER_EXECUTION (<project root>/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71) at runSyncOrAsync (<project root>/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93) at nextLoader (<project root>/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3) at <project root>/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5 at Storage.finished (<project root>/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16) at <project root>/node_modules/graceful-fs/graceful-fs.js:78:16

@Prior99
Copy link

Prior99 commented Feb 22, 2017

I have the exact same problem.

@Prior99
Copy link

Prior99 commented Feb 22, 2017

For now I will work around this issue in my project by fixing awesome-typescript-loader to version 3.0.4 by setting

"awesome-typescript-loader": "=3.0.4",

in my package.json, however this is not really a solution to this problem. Is there something I can change in my webpack config to work around this?

I had a look at webpack/loader-utils#56 and tried changing options to query but without any results. I would rather not go back to configuring my rules using the old query ?option=value syntax.

@dweber019
Copy link

I fixed this by always providing a option to the loader even if it's an empty object like this {}.

If you are using https://github.com/easy-webpack/config-typescript then pass option like this:
require('@easy-webpack/config-typescript')({options: {}})

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

No branches or pull requests

3 participants