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

Error Consuming a TypeScript Dependency #65

Open
ollwenjones opened this issue Mar 9, 2017 · 3 comments
Open

Error Consuming a TypeScript Dependency #65

ollwenjones opened this issue Mar 9, 2017 · 3 comments
Labels

Comments

@ollwenjones
Copy link

I have a project with peer scoped packages, and was hoping to be able to avoid running a compile step in one, or order to do development on the other, but webpack is bombing out with this error:

ERROR in ./~/@my-scope/components/index.ts
Module build failed: Error
    at new FatalError (C:\devel\repos\@my-scope\demo-site\node_modules\tslint\lib\error.js:40:23)
    at Function.findConfiguration (C:\devel\repos\@my-scope\demo-site\node_modules\tslint\lib\configuration.js:47:15)
    at resolveOptions (C:\devel\repos\@my-scope\demo-site\node_modules\tslint-loader\index.js:35:64)
    at Object.module.exports (C:\devel\repos\@my-scope\demo-site\node_modules\tslint-loader\index.js:124:17)
 @ ./src/app/app.module.ts 16:23-55
 @ ./src/main.ts
 @ multi app

loader config:

{
  test: /\.ts$/,
  enforce: 'pre',
  use: 'tslint-loader',
}

excluding /node_modules/ in the loader makes the webpack build run fine, but I assume means I won't be linting that dependency anymore. I can lint it other times/ways, but it's nice to be able to npm link and work in both scoped packages using one dev-server.

using

"tslint": "^4.3.1",
"tslint-loader": "^3.3.0",
@ollwenjones
Copy link
Author

Could be related to #57 ?

@MrJuliuss
Copy link

Hello, webpack give me the same error.

@nathanosdev
Copy link

Including only your application code, or excluding node_modules for this loader will fix/workaround the issue. This does look like a bug, but to be fair, linting 3rd party Typescript is a bad idea as those libraries are very likely to have different linting rules from your own project.

{
  test: /\.ts$/,
  enforce: 'pre',
  loader: 'tslint-loader',
  include: path.resolve(__dirname, 'src')
}

OR

{
  test: /\.ts$/,
  enforce: 'pre',
  loader: 'tslint-loader',
  exclude: path.resolve(__dirname, 'node_modules')
}

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

No branches or pull requests

4 participants