Open ajaydexati opened 4 years ago
`diff --git a/package.json b/package.json index 2e6050b..2f82680 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,11 @@ "@tensorflow/tfjs-converter": "^1.7.0", "@tensorflow/tfjs-core": "^1.7.0", "face-api.js": "^0.22.1",
then fixed!
on running yarn build after the above changes. Environment - macOS and above error i mentioned is for mac os only $yarn build
pose-animator-master/node_modules/paper/dist/paper-full.js:17258:12: Unterminated string constant (17258:12)
17256 | }
17257 | if (/^(inline|both)$/.test(sourceMaps)) {
> 17258 | code += "\n
| ^
17259 | + self.btoa(unescape(encodeURIComponent(
17260 | JSON.stringify(map))));
17261 | }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
My workaround was to hand-edit node_modules/paper/dist/paper-full.js
. This is offending block:
if (/^(inline|both)$/.test(sourceMaps)) {
code += "\n//# sourceMappingURL=data:application/json;base64,"
+ self.btoa(unescape(encodeURIComponent(
JSON.stringify(map))));
}
code += "\n//# sourceURL=" + (url || 'paperscript');
I changed it to:
if (/^(inline|both)$/.test(sourceMaps)) {
code += "\n\/\/# sourceMappingURL=data:application/json;base64," + self.btoa(unescape(encodeURIComponent( JSON.stringify(map))));
}
code += "\n\/\/# sourceURL=" + (url || 'paperscript');
And then everything worked.
Why a public project have this kind of error? T T....
After modifying package.json according to answers and able to run the yarn watch. But when building the project using yarn build, then running the by clicking index.html and going to camera.html its show : Invalid regular expression: range out of order in character class in camera.js