code-server: Build doesn't work

  • code-server version: OS 10.14.6
  • OS Version: OS 10.14.6

Description

When trying to build locally I get this error:

Command failed: yarn gulp compile-extensions-build --max-old-space-size=32384 internal/modules/cjs/loader.js:638 throw err; ^

Error: Cannot find module ‘gulp-bom’ at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/Users/a1010101/workspace/pioneerlabs/techrank/ide/code-server/source/vscode-1.39.2-source/build/lib/compilation.js:10:13) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:787: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) error Command failed with exit code 1.

error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Steps to Reproduce

  1. clone the git repo 2.yarn build 1.39.2 development

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

I tried your previous comment once again and this time, I was successfully able to but a version of code-server. Thank you for the help

Side note, I didn’t really change anything so I’m not sure what went wrong the first time

I just ran into this as well, and doing an rm -rf $OUT/source and re-running the build fixed it. My guess is that if you run the build, interrupt it before it installs all dependencies (e.g. by ctrl+cing out of it) that you get stuck in a state where the build script thinks you have the dependencies, but you don’t.

We could probably fix this by just always running yarn here instead of conditionally based on the node_modules folder: https://github.com/cdr/code-server/blob/master/scripts/build.ts#L172-L178 but I’m not sure what the speed implications are here for CI.