Problems Building Site

240 views
Skip to first unread message

Edward Ost

unread,
Jun 20, 2023, 3:37:43 AM6/20/23
to codelab-authors
I am trying to follow the tutorial referenced in codelab tools github home page  https://medium.com/zarinlo/publish-technical-tutorials-in-google-codelab-format-b07ef76972cd  .

I have downloaded all the pre-requisites and I am trying to run NPM install from the site directory.  But I get an error returned from gyp.  I've attached the full log, but here is the subset with the error:

npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack                       ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:419:12)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! gyp ERR! System Linux 5.15.90.1-microsoft-standard-WSL2
npm ERR! gyp ERR! command "/usr/local/node-v18.16.0-linux-x64/bin/node" "/home/eost/codelab/tools/site/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /home/eost/codelab/tools/site/node_modules/node-sass
npm ERR! gyp ERR! node -v v18.16.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1


Some potentially unusual details about my system.  I am running Ubuntu  on Windows Subsystem for Linux (WSL).

I have python3 installed so I set the npm to us it

    npm config set python /usr/bin/python3

I am using python 3.8.10.
2023-06-20T07_30_18_930Z-debug-0.log

agogo...@gmail.com

unread,
Nov 2, 2024, 11:52:28 AM11/2/24
to codelab-authors
Seems I have thesame error. Did you find a fix for this?

Khalil Hammami

unread,
Nov 2, 2024, 3:31:35 PM11/2/24
to codelab-authors
you may need to use an old version of node, try to use node v14 to build/serve the site (I'm using nvm to manage node versions)

Zarin Lokhandwala

unread,
Mar 30, 2025, 2:31:13 PMMar 30
to Khalil Hammami, codelab-authors
I fixed all the build issues a few months ago. 

However, it requires the approval of at least two people that manage the Google project. I have received the approval from one, but cannot proceed until someone else merges the branch in. 

Please fork the PR I submitted. There are no more errors. 

My GitHub handle is @zarinlo. 

Zarin 

--
You received this message because you are subscribed to the Google Groups "codelab-authors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codelab-autho...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/codelab-authors/eae1e471-3ecb-4a57-812a-7f467558b756n%40googlegroups.com.

Marcos Manuel Ortega

unread,
Oct 24, 2025, 9:05:38 AMOct 24
to codelab-authors
I just also encountered this error, upping this so that @zarin PR is finally accepted
In the meantime, cloning her repo instead worked, although multiple deprecation warnings: https://github.com/zarinlo/tools/commits/master/

Thanks @zarin for your continue work on this!

Zarin Lokhandwala

unread,
Oct 26, 2025, 11:52:55 AMOct 26
to Marcos Manuel Ortega, codelab-authors
Been waiting for years at this point 🫠

Marc did his best to get it accepted. 

Honestly, I can just share my personal repo here and you can clone that, it has the fix.

Zarin 

Reply all
Reply to author
Forward
0 new messages