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

Pwndoc Frontend Docker Image Build Error - node-waf not found #515

Open
shiblisec opened this issue Apr 1, 2024 · 6 comments
Open

Pwndoc Frontend Docker Image Build Error - node-waf not found #515

shiblisec opened this issue Apr 1, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@shiblisec
Copy link

Describe the bug

while trying to create the docker image for pwndoc-frontend I started facing node-waf not found error, the error recently came up.

To Reproduce
Steps to reproduce the behavior:

  1. cd into frontend
  2. Run the following command
docker build -t pwndoc-frontend .

observe the following error

 => CACHED [stage-1 4/5] COPY ssl/server* /etc/nginx/ssl/                                                                                                                                                                                                               0.0s
 => ERROR [build 4/6] RUN npm install                                                                                                                                                                                                                                 143.9s
------                                                                                                                                                                                                                                                                       
 > [build 4/6] RUN npm install:                                                                                                                                                                                                                                              
126.8 npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated                                                                                                                                                                                
130.5 npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated                                                                                                                                                                                   
130.5 npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.                                                                                                                                                                           
130.7 npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated                                                                                                                                                                      
130.9 npm WARN deprecated [email protected]: Please use @electron/get moving forward.
130.9 npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
131.0 npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
131.4 npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
131.5 npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
132.8 npm WARN deprecated [email protected]: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog
134.1 npm WARN deprecated [email protected]: this library is no longer supported
134.1 npm WARN deprecated [email protected]: Please use @electron/notarize moving forward.  There is no API change, just a package name change
134.2 npm WARN deprecated [email protected]: Please use @electron/osx-sign moving forward. Be aware the API is slightly different
134.7 npm WARN deprecated [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
134.7 npm WARN deprecated [email protected]: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog
134.9 npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
135.1 npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
135.1 npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
135.6 npm WARN deprecated [email protected]: Support has ended for 9.x series. Upgrade to @latest
136.2 npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead.
136.2 npm WARN deprecated [email protected]: This module is no longer supported.
136.3 npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.
136.6 npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
136.6 npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
136.8 npm WARN deprecated [email protected]: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.
137.0 npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
143.5 npm ERR! code 127
143.5 npm ERR! path /app/node_modules/zlib
143.5 npm ERR! command failed
143.5 npm ERR! command sh -c node-waf clean || true; node-waf configure build
143.5 npm ERR! sh: node-waf: not found
143.5 npm ERR! sh: node-waf: not found
143.5 
143.5 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-04-01T06_15_56_245Z-debug-0.log
------
Dockerfile:5
--------------------
   3 |     WORKDIR /app
   4 |     COPY package.json ./
   5 | >>> RUN npm install
   6 |     COPY . .
   7 |     RUN npm run build
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install" did not complete successfully: exit code: 127
@shiblisec shiblisec added the bug Something isn't working label Apr 1, 2024
@kandrei
Copy link

kandrei commented Apr 1, 2024

I think that the zlib node module that quasar needs is not needed anymore as it's included in the main node package from newer versions onwards. Until the project gets updated to the latest quasar dependency, I was able to build the project by changing the node:lts-alpine dependency to node:17-alpine in frontend/Dockerfile.

@shiblisec
Copy link
Author

Thanks, for now I was able to build the frontend image using the node:17-alpine image , keeping the issue open so that a permanent fix can be deployed for this.

@peterspbr
Copy link

I'm getting the same error :(

@peterdew
Copy link

Me too @peterspbr. I managed to carry out the workaround ith the following steps according to the instructions from @kandrei and @shiblisec

Go to the frontend folder in de repo.
Open the file 'Dockerfile'
Change the second line saying:
"FROM node:lts-alpine AS build"
into
"FROM node:17-alpine AS build"

Assuming that you already use Node.js v17

@Collected5353
Copy link

Should we send a PR For this? or is the goal to keep on lts-alpine?

@yeln4ts
Copy link
Contributor

yeln4ts commented May 10, 2024

Is it still not working ? I just tried with a fresh install with node-lts at version 20.13.1 and I did not have the node-waf error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants