Angular 2 - 404 traceur not found

后端 未结 17 2985
故里飘歌
故里飘歌 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 02:58

    I got this error when run angular4 quickstart project on asp.net mvc. changing "es2015" to "commonjs" inside tsconfig.json solved my problem.

    0 讨论(0)
  • 2020-12-03 02:58

    The problem is within the system.js I think:

    There is a regex, which is used to detect import-statements:

    var esmRegEx = /(^\s*|[}\);\n]\s*)(import\s*(['"]|(\*\s+as\s+)?[^"'\(\)\n;]+\s*from\s*['"]|\{)|export\s+\*\s+from\s+["']|export\s*(\{|default|function|class|var|const|let|async\s+function))/; 
    

    This regex will detect import-statements within multiline-comments and cause this horrible error. I have opened an issue here:

    https://github.com/systemjs/systemjs/issues/1408

    0 讨论(0)
  • 2020-12-03 02:59

    I think the first thing you should do is to check whether you have download the traceur!I have met this problems and it token me several hours to search.But I found there is not a traceur in my node_modules directory. So I have try npm install traceur to install traceur.Then update the systemjs.config.js,adding a line like 'traceur':'npm:traceur/bin/traceur.js'. Fortunately,this problem was resolved.Hope this can help you !

    0 讨论(0)
  • 2020-12-03 02:59

    For me, what happened is a co-worker deleted a TypeScript file, which meant I had an old *.js file no longer needed (since our source control ignores these files). If the traceur error references a *.js file you don't need, delete the file.

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

    Because of version change it throws 404 error. to resolve this issue we need to do below modifications in systemjs.config.js file:

    1. replace npm:angular-in-memory-web-api/ with npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js. in map.

    2. remove below code in packages:

      'angular-in-memory-web-api': {
          main: './index.js',
          defaultExtension: 'js'
      }
      
    0 讨论(0)
  • 2020-12-03 03:01

    The issue was that one of my services was invalid. I've added the constructor as one of the last methods for demonstrating purposes and it refused to load.

    So for those that would ever encounter this error, open up the error and check the referenced files for errors. The issue is NOT that he doesn't find traceur but it is that he CANNOT load a file.

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