Please provide us with the following information:
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Ubuntu 16.04
- Versions. Please run
ng --version. If there’s nothing outputted, please run
in a Terminal: node --version and paste the result here:
angular-cli: local (v1.0.0-beta.11-webpack.8, branch: master)
node: 6.5.0
os: linux x64
- Repro steps. Was this an app that wasn’t created using the CLI? What change did you
do on your code? etc.
I updated to master branch and tried to build or serve
- The log given by the failure. Normally this include a stack trace and some
more information.
/home/test/angular-cli/node_modules/webpack-sources/node_modules/source-map/lib/source-map-consumer.js:704
throw new Error('"' + aSource + '" is not in the SourceMap.');
^
Error: "/home/test/angular-cli/node_modules/angular2-template-loader/index.js!/var/www/html/public/project/src/app/app.component.ts" is not in the SourceMap.
at SourceMapConsumer_sourceContentFor [as sourceContentFor] (/home/test/angular-cli/node_modules/webpack-sources/node_modules/source-map/lib/source-map-consumer.js:704:13)
at /home/test/angular-cli/node_modules/webpack-sources/node_modules/source-map/lib/source-node.js:133:40
at Array.forEach (native)
at Function.SourceNode_fromStringWithSourceMap [as fromStringWithSourceMap] (/home/test/angular-cli/node_modules/webpack-sources/node_modules/source-map/lib/source-node.js:132:32)
at SourceMapSource.node (/home/test/angular-cli/node_modules/webpack-sources/lib/SourceMapSource.js:42:20)
at ReplaceSource.node (/home/test/angular-cli/node_modules/webpack-sources/lib/ReplaceSource.js:66:29)
at CachedSource.node (/home/test/angular-cli/node_modules/webpack-sources/lib/CachedSource.js:12:23)
at /home/test/angular-cli/node_modules/webpack-sources/lib/ConcatSource.js:40:49
at Array.map (native)
at ConcatSource.node (/home/test/angular-cli/node_modules/webpack-sources/lib/ConcatSource.js:39:60)
at /home/test/angular-cli/node_modules/webpack-sources/lib/ConcatSource.js:40:49
at Array.map (native)
at ConcatSource.node (/home/test/angular-cli/node_modules/webpack-sources/lib/ConcatSource.js:39:60)
at /home/test/angular-cli/node_modules/webpack-sources/lib/ConcatSource.js:40:49
at Array.map (native)
at ConcatSource.node (/home/test/angular-cli/node_modules/webpack-sources/lib/ConcatSource.js:39:60)
at /home/test/angular-cli/node_modules/webpack-sources/lib/ConcatSource.js:40:49
at Array.map (native)
at ConcatSource.node (/home/test/angular-cli/node_modules/webpack-sources/lib/ConcatSource.js:39:60)
at ConcatSource.proto.sourceAndMap (/home/test/angular-cli/node_modules/webpack-sources/lib/SourceAndMapMixin.js:28:18)
at CachedSource.sourceAndMap (/home/test/angular-cli/node_modules/webpack-sources/lib/CachedSource.js:51:28)
at Compilation.<anonymous> (/home/test/angular-cli/node_modules/webpack/lib/SourceMapDevToolPlugin.js:57:32)
- Mention any other details that might be useful.
Same issue. angular-cli: 1.0.0-beta.15 node: 4.2.6 os: Ubuntu 16.04 x64
Additional details: Created the project on my laptop (also Ubuntu 16.04, angular-cli 1.0.0-beta.15, node 4.2.6) and it built/served fine. This failure occurs on my desktop after
git cloneing the repo.Edit: Ran a
git clean -dfxfollowed bynpm installfollowed byng serveand it seems to be working now. I’m guessing there was some leftover stuff in the directory from prior to migrating my project to use angular-cli.it’s an NPM flag, you can do
ng new ProjectName --skip-npmand thennpm install --no-bin-linksHaving the exact same issue building a docker image. Using Node:6.7.0 and CLI:1.0.0-beta.19-3. It works fine in dev mode but when I change NODE_ENV=production, $ ng build, fails with the following error:
/usr/lib/node_modules/angular-cli/node_modules/webpack-sources/node_modules/source-map/lib/source-map-consumer.js:704 throw new Error(‘"’ + aSource + ‘" is not in the SourceMap.’);
I have the same issue on Mac OS X Yosemite.