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

Upgrading to 3.0.2 : Errors in previously 'clean' build #655

Closed
roddypratt opened this issue Oct 16, 2017 · 12 comments
Closed

Upgrading to 3.0.2 : Errors in previously 'clean' build #655

roddypratt opened this issue Oct 16, 2017 · 12 comments

Comments

@roddypratt
Copy link

I've been using 2.3.7 for a while without issues. Upgraded to 3.0.2, and suddenly I see loads of errors in the build.

Most are JQuery related, like

ERROR in ./src/buttonbus.ts
[tsl] ERROR in C:\WebCentre\src\buttonbus.ts(30,11)
      TS2304: Cannot find name 'JQuery'.

I'm using TS 2.5.3, Webpack 3.7.1

Webpack.js has this snippet

      {
        test: /\.ts$/,
        loader: 'ts-loader',
        options: {
            logLevel: "info"
          }
      },

... and my tsconfig.json looks like this.

{
  "compileOnsave": true,
  "compilerOptions": {
    "module": "es6",
    "removeComments": true,
    "outDir": "js_out",
    "allowJs": true,
    "sourceMap": true,
    "noImplicitAny" : false,
    "noUnusedLocals": false,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "forceConsistentCasingInFileNames": true,
    "target": "es6",
    "types" : ["fb", "gapi.youtube"]
  },
  "include": [ "src/*.ts" ]
}

Any suggestions welcome. I appreciate there's a big change to V3 but I can't see anything relevant in the options that I'd need to adjust?

@johnnyreilly
Copy link
Member

Do you want to try adding entryFileCannotBeJs: true as an option? That's the only thing that occurs...

@johnnyreilly
Copy link
Member

Would you be able to supply a minimal reproduction of the issue if that doesn't work? I'm really keen not to break people's projects. It's a breaking changes release but I was anticipating that most of the breaking changes wouldn't affect anyone. I've had some publishing issues with npm today so I'm trying to isolate the problem

@roddypratt
Copy link
Author

Thanks! entryFileCannotBeJs: true fixes it. (Also, removing the allowJs:true from my tsconfig.json works - I'm not actually sure why that was there in the first place...)

@johnnyreilly
Copy link
Member

Great! Would you still be able to supply me with a minimal repro of the issue?. I think what you've stumbled on is a bug in ts-loader that I'd like to fix. But without being able to reproduce it, I can't!

@roddypratt
Copy link
Author

Sure. I'll see what I can do...

@johnnyreilly
Copy link
Member

Thanks - I appreciate it

@roddypratt
Copy link
Author

@johnnyreilly Fairly minimal example here. Better late than never...

https://github.com/roddypratt/tsloaderbug

Hopefully this will back up that this is a dupe of 657.

@johnnyreilly
Copy link
Member

Thanks @roddypratt - I'll use it to double check.

@johnnyreilly
Copy link
Member

Looking good so far - hopefully v3.0.3 of ts-loader will remove the need to use entryFileCannotBeJs: true

johnnyreilly added a commit that referenced this issue Oct 18, 2017
@johnnyreilly
Copy link
Member

Fix released with 3.0.3

@roddypratt
Copy link
Author

Verified fixed!

@johnnyreilly
Copy link
Member

Sweet!

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