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

Module build failed: Error: resultPath.match is not a function #109

Closed
timbru31 opened this issue Mar 22, 2016 · 5 comments
Closed

Module build failed: Error: resultPath.match is not a function #109

timbru31 opened this issue Mar 22, 2016 · 5 comments

Comments

@timbru31
Copy link

The issue was introduced with commit d7a8a64, it occurs here:
d7a8a64#diff-50bb07c4a1e1eae42d7fec97d2d8b8eeR42

We have the following in our webpack loader config (relevant snippet)

{
    exclude: path.resolve('node_modules/'),
    loader: `babel?presets[]=es2015!awesome-typescript?emitRequireType=false&forkChecker=true`,
    test: /\.tsx?$/
}

Is this a regression due to js support or do we have to change/update our webpack loader config?

Thanks,
Tim

@s-panferov
Copy link
Owner

@timbru31 thanks for your report. This looks like a regression. Could you please modify loader's code locally and log resultPath variable?

@timbru31
Copy link
Author

Hope this helps, if not I'll be happy to provide more information. Note: I'm using webpack 2.1.0-beta.4 if that matters.

[ '/Users/timbrust/Coding/work/my-project/__tests__/features/step-definitions/prepare.ts',
  { module: false,
    descriptionFileData:
     { name: 'my-project',
       version: '10.3.0',
       scripts: [Object],
       license: 'UNLICENSED',
       private: true,
       devDependencies: [Object],
       dependencies: [Object],
       engines: [Object],
       config: [Object] },
    descriptionFilePath: '/Users/timbrust/Coding/work/my-project/package.json',
    query: '',
    context: {},
    request: undefined,
    descriptionFileRoot: '/Users/timbrust/Coding/work/my-project',
    file: false,
    relativePath: './__tests__/features/step-definitions/prepare.ts',
    path: '/Users/timbrust/Coding/work/my-project/__tests__/features/step-definitions/prepare.ts' } ]
Error: resultPath.match is not a function
    Required in /Users/timbrust/Coding/work/my-project/__tests__/itests.ts Error: resultPath.match is not a function
    Required in /Users/timbrust/Coding/work/my-project/__tests__/itests.ts
    at ResolutionError.Error (native)
    at new ResolutionError (/Users/timbrust/Coding/work/my-project/node_modules/awesome-typescript-loader/dist/deps.js:281:7)
    at /Users/timbrust/Coding/work/my-project/node_modules/awesome-typescript-loader/dist/deps.js:165:27
    at run (/Users/timbrust/Coding/work/my-project/node_modules/core-js/modules/es6.promise.js:89:22)
    at /Users/timbrust/Coding/work/my-project/node_modules/core-js/modules/es6.promise.js:102:28
    at flush (/Users/timbrust/Coding/work/my-project/node_modules/core-js/modules/_microtask.js:14:5)
    at nextTickCallbackWith0Args (node.js:415:9)
    at process._tickCallback (node.js:344:13)

@s-panferov
Copy link
Owner

@timbru31 it seems that webpack2 has different result format. I'll try to fix this

@s-panferov
Copy link
Owner

@timbru31 fix in v0.17.0-rc.2. Please try it on your codebase.

@timbru31
Copy link
Author

Thanks for the quick fix, works fine with both wepback 1 and 2. 🍻

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

2 participants