yemount / pose-animator

Apache License 2.0
8.72k stars 962 forks source link

Build Error:- macOS #36

Open ajaydexati opened 4 years ago

ajaydexati commented 4 years ago

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

h4rk8s commented 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!

ajaydexati commented 4 years ago

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.
matthewtoast commented 3 years ago

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.

pansy199211 commented 3 years ago

Why a public project have this kind of error? T T....