You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the project is built and deployed on Heroku, the following error appears. This error does not appear when using the standard face-api.js npm package: Uncaught SyntaxError: Invalid left-hand side expression in postfix operation
This references the following minified code: async nextState(e){await e;let t=await wF(this.iterators,function(e){return e instanceof wJ?{value:e.next().then(e=>(0++,e.done&&0++,e.value)),recurse:!1}:{value:null,recurse:!0}});
It seems that "0++" is causing the issue here. This appears to be minified from the following function in @tensorflow\tfjs\node_modules\@tensorflow\tfjs-data\src\iterators\lazy_iterator.ts. It appears that the variables numIterators and iteratorsDone are reduced to simply 0, thus giving the code 0++.
let numIterators = 0;
let iteratorsDone = 0;
function getNext(container: IteratorContainer): DeepMapAsyncResult {
if (container instanceof LazyIterator) {
const result = container.next();
return {
value: result.then(x => {
numIterators++;
if (x.done) {
iteratorsDone++;
}
return x.value;
}),
recurse: false
};
} else {
return {value: null, recurse: true};
}
}
Hey @vladmandic, thanks for checking in - I managed to work around this issue by passing swcMinify: false in next.config.js. I hoped this would use a different minification process which would avoid the error, and it did! So a bit of a lazy solution but hey 💃
Issue Description
When the project is built and deployed on Heroku, the following error appears. This error does not appear when using the standard face-api.js npm package:
Uncaught SyntaxError: Invalid left-hand side expression in postfix operation
This references the following minified code:
async nextState(e){await e;let t=await wF(this.iterators,function(e){return e instanceof wJ?{value:e.next().then(e=>(0++,e.done&&0++,e.value)),recurse:!1}:{value:null,recurse:!0}});
It seems that "0++" is causing the issue here. This appears to be minified from the following function in
@tensorflow\tfjs\node_modules\@tensorflow\tfjs-data\src\iterators\lazy_iterator.ts
. It appears that the variables numIterators and iteratorsDone are reduced to simply 0, thus giving the code 0++.**Environment
js
,esm
,esm-nobundle
)? ESM.The text was updated successfully, but these errors were encountered: