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

There is also error caused by webpack-sources #562

Closed

Description

image

"webpack": "^2.1.0-beta.27"

I got this error after i updated dependencies according to framework updates (http://blog.ionic.io/rc3-error-reporting-final-oh-my/)

Activity

  1. ghost changed the title [-]There is also error coused by webpack-sources[/-] [+]There is also error caused by webpack-sources[/+] on Dec 15, 2016
  2. danbucholtz commented on Dec 15, 2016

    @danbucholtz
    Contributor

    Hi @Spaha,

    Can you provide some more details or a repo demonstrating the issue?

    Thanks,
    Dan

  3. herbzi commented on Dec 16, 2016

    @herbzi

    +1
    I also had this problem and struggled to find any information on what could be causing it. I had to revert to .46 .

  4. stewones commented on Dec 16, 2016

    @stewones
  5. parkbytes commented on Dec 17, 2016

    @parkbytes

    I was facing the same issue and isolated the problem to multiple components within same .ts file. in my RC3 project.

    Update: More specifically this occurs when the second component within the .ts file uses a templateUrl as opposed to template for its decoration.

    Applied the single responsibility principle from Angular and separated the components into their respective .ts files to resolve the original issue reported here.

    https://angular.io/docs/ts/latest/guide/style-guide.html#!#single-responsibility

    I was able to narrow down the issue by manually migrating old rc3 project (part by part) to a freshly created rc4 project.!!!

    Maybe the experts can confirm.

  6. herbzi commented on Dec 18, 2016

    @herbzi

    Nice work. I also have multiple components in the same file. Thanks for going through the trouble of isolating it. I think i'll just separate them now considering I had another issue in a previous version of ionic related to this. Might as well stick with the crowd because they don't really test this internally.

    Edit: Separating them into individual files worked for me.

  7. coreymcmahon commented on Dec 19, 2016

    @coreymcmahon

    I'm slightly confused by the suggested fix here. It seems to be breaking when there are multiple components within the same .ts file, but that isn't strictly prohibited by Angular 2, right? So this is still a valid bug. Or am I missing something?

  8. herbzi commented on Dec 19, 2016

    @herbzi

    Yes it's still a valid bug that needs addressing. I was just saying that I have had an issue with exactly multiple components within in a single file in the past. #115

    This was later fixed and now another issue is cropping up. I'd rather stick with the style guide rather than facing more issues in the future because I don't think they test it internally.

    I'm sure someone will come and take a look at it now that we have found a way to reproduce it.

  9. tkem commented on Dec 19, 2016

    @tkem

    I think I stumbled upon another workaround, which does not require modification of any source files. As documented here, I added the following to my package.json:

      "config": {
        "ionic_source_map_type": "eval"
      }
    

    According to the docs, this will change some webpack option, which defaults to source-map, thus probably triggering the error. Now, I have absolutely no clue what eval does (or webpack in general, for that matter), but for the moment I'm happy enough that I can run ionic serve with app-scripts 0.0.47!

    And yes, I (seldomly) do put multiple components in one .ts file; for example, I like to place popups/context menus, which are only a few lines, in the same file as their "parent" page. You may argue about style here, but a build tool still shouldn't croak on this...

  10. murshid1988 commented on Dec 20, 2016

    @murshid1988

    @tkem This worked for me too. But like you said, this is not a proper fix

  11. danbucholtz commented on Dec 20, 2016

    @danbucholtz
    Contributor

    @tkem,

    I think we'll have some problems indefinitely with multiple components, etc in one file. I don't recommend that right now. We'll fix eventually but bigger fish to fry first.

    Thanks,
    Dan

  12. tkem commented on Dec 20, 2016

    @tkem

    @danbucholtz: If that's really been identified as the cause of this issue, that would be fine with me. It's still an RC, after all. I'd just like to see this stated prominently in a list of known bugs/limitations in the release notes.

  13. danbucholtz commented on Dec 20, 2016

    @danbucholtz
    Contributor

    @tkem,

    I've never actually seen this issue and it's not a popular one so it probably isn't happening for many people. I need to look into it more.

    Thanks,
    Dan

  14. tkem commented on Dec 20, 2016

    @tkem

    @danbucholtz: Sure. If you're still looking for a public repo for this: https://github.com/tkem/openlap

    The ionic2-rc.4 branch should be up to date and contains the ionic_source_map_type: eval workaround, and npm run ionic:build works just fine.

    The ionic2-rc.4-source-map branch sets ionic_source_map_type to source-map (the default according to the docs), and ionic:build aborts with the TypeError.

    There's also a Travis CI build for the latter that shows the same behavior:
    https://travis-ci.org/tkem/openlap/builds/185582821
    It's quite verbose, so it should also give you enough info about the build environment.

    Hope that helps somewhat,
    Thomas

  15. danbucholtz commented on Jan 5, 2017

    @danbucholtz
    Contributor

    Can someone explain this to me like I'm 5? Sorry, I am not up to speed on this. Is this due to multiple components in the same file? If so, I recommend not doing that for now 😸

    Thanks,
    Dan

  16. danbucholtz commented on Jan 28, 2017

    @danbucholtz
    Contributor

    Due to lack of response, I'm going to close this issue. I was never able to recreate or understand what was happening.

    Please open another issue if needed.

    Thanks,
    Dan

  17. locked and limited conversation to collaborators on Jan 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions