Skip to content
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

Python 3: "make template" fails #532

Open
spoeschel opened this issue Apr 28, 2020 · 3 comments
Open

Python 3: "make template" fails #532

spoeschel opened this issue Apr 28, 2020 · 3 comments
Assignees

Comments

@spoeschel
Copy link
Collaborator

Currently the template make target (also invoked as part of the all target) of the release/3.0 branch fails:

$ make template
npm update nunjucks
node_modules/nunjucks/bin/precompile ebu_tt_live/ui/user_input_producer/template/user_input_producer_template.xml > ebu_tt_live/ui/user_input_producer/template/user_input_producer_template.js
/home/stefan/DL-Source/ebu-tt-live-toolkit3/node_modules/nunjucks/src/precompile.js:114
  name = name.replace(/\\/g, '/');
              ^

TypeError: name.replace is not a function
    at _precompile (/home/stefan/DL-Source/ebu-tt-live-toolkit3/node_modules/nunjucks/src/precompile.js:114:15)
    at precompile (/home/stefan/DL-Source/ebu-tt-live-toolkit3/node_modules/nunjucks/src/precompile.js:85:22)
    at Object.<anonymous> (/home/stefan/DL-Source/ebu-tt-live-toolkit3/node_modules/nunjucks/bin/precompile:45:13)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
Makefile:35: recipe for target 'template' failed
make: *** [template] Error 1

It seems that the name option of the precompile script of Nunjucks (v3.2.1) plays a role - though the option is optional if a file is specified, as far as I can see.

@nigelmegitt
Copy link
Collaborator

Thanks @spoeschel I'll look to see if we've fixed this in our fork.

@nigelmegitt nigelmegitt self-assigned this Apr 28, 2020
@nigelmegitt
Copy link
Collaborator

Ah, no, we haven't. I can reproduce this.

@johnjcamilleri
Copy link

Same issue here, it's nothing to do with your Python version (as issue title implies). I got around it with:

npm install [email protected]

(instead of npm install nunjucks).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants