Problem with npm run build

I download from git the project and I get an error when try running np, run build

Hi @Asaf_Shay, could you which version of Node.js are you using?

In general, this seems like a rather old version, maybe try nuking everything and pulling fresh code as a first step?

node 14.17.4
npm 6.14.14
on my computer is running without any problem
this error that I’m getting it’s on new computer

Is that from GitHub or is it a copy of the n8n source from another machine?

from GitHub
I try to install all kinds of packages like typescript, node-gyp, etc
now I get

Is it the latest code? I thought that issue was resolved.

Did you remember to run the lerna command first as well? I would be tempted to delete what you have and pull it again to see if that then works.

yes, now i get to this point

That is very strange, Can you confirm the commands you have been running?

it’s not so strange because I have the same problems when I try to install it on my computer.
1)clone from git
2)go to n8n folder
3)npm install --global lerna
4)lerna bootstrap --hoist
5)npm run build

this is the list of command that I already tested
npm install -g node-gyp
npm i python
npm install --global --production windows-build-tools
npm config set python “D:\Python27\python.exe”
npm config set node_gyp “D:\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js”

npm install @vue/cli-service -g
install node 14.17.4 !!!
npm i --save-dev @types/validator
install python 3.9.6 !!!
(i install early the npm 6.14.14)
npm i -g install-cmake
npm install n8n -g
windows update
go to cli package
npm cache verify !!
npm i
in n8n i run → npm run build
clone from git
npm install -g gulp
npm install node-gyp
npm install -g gulp-cli
npm install -g typescript
npm install gulp
npm i
npm audit fix
npm install gulp-sass
npm install -g gulp-sass
npm i gulp-dart-sass
npm i gulp-autoprefixer
npm i gulp-clean-css
npm install @vue/cli-service -g

remember that this is a fresh machine

It shouldn’t be necessary on a fresh machine, but just for the sake of it (I assume you’re on the master branch): Could you try cleaning everything using

git reset --hard
git clean -dfx
npm i
lerna bootstrap --hoist

before running npm run build again?

Another thing that comes to mind: How did you clone the repo from git? Were you downloading it as a ZIP file or were you using a git client?


thanks !!! it’s working