-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
no such file or directory, open '.../assets/dag-map.js.map' #29
Comments
I have the same problem. Didn't happen with |
@stevenwu can you reproduce with a fresh |
this was likely caused by updating https://github.com/lydell/source-map-url from problem now is figuring out where |
dag-map is most likely krisselden/dag-map, but I don’t know why it would be manually concatted to the output (it isn’t part of a default ember-cli app)... |
Not sure if it helps but I've hit this issue too now. With our app at Ember 2.12 everything builds as expected, but if I then upgrade the app to Ember 2.16 (both via bower, not npm) it fails with that error during prod build. |
Ember internally uses dag-map perhaps it is including a sourcemap comment referencing the external file? |
Yeah, I think the issue is sourcemap and one of the addons in my project. |
It also only seems to hit if you build in prod mode. |
It seems that this depends on the Ember version that you're running on. emberjs/ember.js#15577 aimed to fix a similar issue, but it is not clear yet whether that fix also works for this issue here and in which Ember versions it was included. |
@Turbo87 - do you happen to know if this can be reproduced on a new app? |
I've just tried to reproduce this with a clean |
@Turbo87, @rwjblue - here is a reproduction: https://github.com/boris-petrov/ember-cli-uglify-issue I did an I hope this is enough for you to debug it. Please tell me if I can help more. |
@boris-petrov awesome, thanks. I think while this is certainly a valid issue, it is 1) an issue in Ember.js, not |
@Turbo87 - I'm not sure what you mean that it is a problem in Ember.js. I've narrowed it down to |
@boris-petrov the problem is that |
I see. Ok, thanks, I'll be waiting for a fix then. Should I expect one soon or is this a low priority for you now? |
I'm not that involved with the Ember.js bundling process and got a few other things to wrap up first. Feel free to have a look :) |
I'm working on an app that has migrated to ember-source and I can reproduce the error. |
I have changed my package.json file to try and track down when this started happening. This is what I found, changing only the |
OK, so it is not related to bower, but also ember-source |
I need to understand the bug that was fixed in If you take a look at [ember-source's source](https://unpkg.com/ember-source@2.14.0/dist/ember.debug.js) you can see that we do have `//# sourceMappingURL=dag-map.js.map` in the output (for `dag-map` module).enifed("dag-map", ["exports"], function (exports) {
"use strict";
/**
* A topologically ordered map of key/value pairs with a simple API for adding constraints.
*
* Edges can forward reference keys that have not been added yet (the forward reference will
* map the key to undefined).
*/
var DAG = function () {
function DAG() {
this._vertices = new Vertices();
}
/**
* Adds a key/value pair with dependencies on other key/value pairs.
*
* @public
* @param key The key of the vertex to be added.
* @param value The value of that vertex.
* @param before A key or array of keys of the vertices that must
* be visited before this vertex.
* @param after An string or array of strings with the keys of the
* vertices that must be after this vertex is visited.
*/
DAG.prototype.add = function (key, value, before, after) {
if (!key) throw new Error('argument `key` is required');
var vertices = this._vertices;
var v = vertices.add(key);
v.val = value;
if (before) {
if (typeof before === "string") {
vertices.addEdge(v, vertices.add(before));
} else {
for (var i = 0; i < before.length; i++) {
vertices.addEdge(v, vertices.add(before[i]));
}
}
}
if (after) {
if (typeof after === "string") {
vertices.addEdge(vertices.add(after), v);
} else {
for (var i = 0; i < after.length; i++) {
vertices.addEdge(vertices.add(after[i]), v);
}
}
}
};
/**
* @deprecated please use add.
*/
DAG.prototype.addEdges = function (key, value, before, after) {
this.add(key, value, before, after);
};
/**
* Visits key/value pairs in topological order.
*
* @public
* @param callback The function to be invoked with each key/value.
*/
DAG.prototype.each = function (callback) {
this._vertices.walk(callback);
};
/**
* @deprecated please use each.
*/
DAG.prototype.topsort = function (callback) {
this.each(callback);
};
return DAG;
}();
exports.default = DAG;
/** @private */
var Vertices = function () {
function Vertices() {
this.length = 0;
this.stack = new IntStack();
this.path = new IntStack();
this.result = new IntStack();
}
Vertices.prototype.add = function (key) {
if (!key) throw new Error("missing key");
var l = this.length | 0;
var vertex;
for (var i = 0; i < l; i++) {
vertex = this[i];
if (vertex.key === key) return vertex;
}
this.length = l + 1;
return this[l] = {
idx: l,
key: key,
val: undefined,
out: false,
flag: false,
length: 0
};
};
Vertices.prototype.addEdge = function (v, w) {
this.check(v, w.key);
var l = w.length | 0;
for (var i = 0; i < l; i++) {
if (w[i] === v.idx) return;
}
w.length = l + 1;
w[l] = v.idx;
v.out = true;
};
Vertices.prototype.walk = function (cb) {
this.reset();
for (var i = 0; i < this.length; i++) {
var vertex = this[i];
if (vertex.out) continue;
this.visit(vertex, "");
}
this.each(this.result, cb);
};
Vertices.prototype.check = function (v, w) {
if (v.key === w) {
throw new Error("cycle detected: " + w + " <- " + w);
}
// quick check
if (v.length === 0) return;
// shallow check
for (var i = 0; i < v.length; i++) {
var key = this[v[i]].key;
if (key === w) {
throw new Error("cycle detected: " + w + " <- " + v.key + " <- " + w);
}
}
// deep check
this.reset();
this.visit(v, w);
if (this.path.length > 0) {
var msg_1 = "cycle detected: " + w;
this.each(this.path, function (key) {
msg_1 += " <- " + key;
});
throw new Error(msg_1);
}
};
Vertices.prototype.reset = function () {
this.stack.length = 0;
this.path.length = 0;
this.result.length = 0;
for (var i = 0, l = this.length; i < l; i++) {
this[i].flag = false;
}
};
Vertices.prototype.visit = function (start, search) {
var _a = this,
stack = _a.stack,
path = _a.path,
result = _a.result;
stack.push(start.idx);
while (stack.length) {
var index = stack.pop() | 0;
if (index >= 0) {
// enter
var vertex = this[index];
if (vertex.flag) continue;
vertex.flag = true;
path.push(index);
if (search === vertex.key) break;
// push exit
stack.push(~index);
this.pushIncoming(vertex);
} else {
// exit
path.pop();
result.push(~index);
}
}
};
Vertices.prototype.pushIncoming = function (incomming) {
var stack = this.stack;
for (var i = incomming.length - 1; i >= 0; i--) {
var index = incomming[i];
if (!this[index].flag) {
stack.push(index);
}
}
};
Vertices.prototype.each = function (indices, cb) {
for (var i = 0, l = indices.length; i < l; i++) {
var vertex = this[indices[i]];
cb(vertex.key, vertex.val);
}
};
return Vertices;
}();
/** @private */
var IntStack = function () {
function IntStack() {
this.length = 0;
}
IntStack.prototype.push = function (n) {
this[this.length++] = n | 0;
};
IntStack.prototype.pop = function () {
return this[--this.length] | 0;
};
return IntStack;
}();
//# sourceMappingURL=dag-map.js.map
}); A few things strike me here:
I suppose for now, we can just strip the comment to squelch this error... |
apparently not, or at least that was the "bug" that was fixed in
that would be my recommendation too |
Babel is not properly ingesting the sourcemaps (even when the upstream funnel brings the mapping file in with it), this commit strips it out to avoid errors during uglification (reported in ember-cli/ember-cli-terser#29).
Babel is not properly ingesting the sourcemaps (even when the upstream funnel brings the mapping file in with it), this commit strips it out to avoid errors during uglification (reported in ember-cli/ember-cli-terser#29). (cherry picked from commit 90da108)
awesome, thank you @rwjblue! |
@boris-petrov no longer needed, now that emberjs/ember.js#15720 is merged. thanks! :) |
Hey everyone, I'm having a similar issue with the addon
ember-popper seems to be exporting the And popper.js has this:
You can test with this repo: https://github.com/urbany/ember-popper-sourcemaps-error EDIT: |
Babel is not properly ingesting the sourcemaps (even when the upstream funnel brings the mapping file in with it), this commit strips it out to avoid errors during uglification (reported in ember-cli/ember-cli-terser#29).
I encountered this issue with swiper module, which has sourceMappingURL at the end of its minified js file in its dist folder. Will the solution be removing sourceMappingURL comment from it? Should I do the same for any other module I encounter to have a correct vendor.js.map? I opened a PR with broccoli-uglify-sourcemap. vendor.js file can have multiple sourceMappingURL locations when modules have their own sourceMappingURL. source-map-url module finds only one sourceMappingURL at a time. This PR removes sourceMappingURL if it doesn't have the same name with the js file until it finds the correct one. |
…r-cli-terser#29 and add inline content for zxcvbn
I installed and setup for the first time.
The text was updated successfully, but these errors were encountered: