Angular 2 - 404 traceur not found

后端 未结 17 2986
故里飘歌
故里飘歌 2020-12-03 02:34

I\'ve followed the starting guide and expanded a little upon for a previous angular 2 version. I\'ve updated my revision and changed everything accordingly. When I am runnin

相关标签:
17条回答
  • 2020-12-03 03:12

    I experienced this same error while migrating from RC4 to RC6.

    For my project, I had to update the systemjs.config.js file. I stopped referencing the root index.js files, and started referencing the core.umd.js files in /bundles.

    Following this: example

    0 讨论(0)
  • 2020-12-03 03:16

    In my case I didn't even had traceur as a dependency in node_modules and the app was working fine but all of a sudden started to ask for traceur after adding a library that didn't need traceur either.

    The solution was to reference the newly added libraries from bundles folders instead of src (or default folder) in system.config.js and specifying the .umd.js version of files. Also, I had to remove the main entry from the packages section.

    The reason behind is that loading the umd modules from the bundle folders does not trigger the traceur transpiler as it assumes the library module is already in the correct format. Otherwise, it may assume that the code is written in es2015 and it needs transpilation so it invokes traceur.

    I came across this traceur issue after trying to connect to a Firebase instance from a perfectly runnable "Tour of Heroes" app with the aid of AngularFire2. I tried all the answers here but none of them helped, so I googled until I found this github issue.

    0 讨论(0)
  • 2020-12-03 03:18

    At first, you should compile your TypeScript files with

    $ tsc 
    

    command. If you are running application outside the node envirnoment, you should compile TypeScript files manually.

    Also check tsconfig.json - if script version is set as ES6 for Angular 2.0

    0 讨论(0)
  • 2020-12-03 03:19

    I had this exact issue which was resolved by correcting the name of a file.

    0 讨论(0)
  • 2020-12-03 03:23

    In case it helps anyone, both times I've experienced this issue, it's been caused by multiline comments (see Picci's answer here for an example).

    0 讨论(0)
提交回复
热议问题