我正在尝试从源代码构建https://github.com/Microsoft/vscode,但我不确定该做什么。当我运行scripts\npm.bat install
时,它已成功完成。然后我跑了scripts\code.bat
,出现了一个陌生的窗口。它是编译版本吗?它似乎没有正常工作。
如何创建完整版?页面:
未提供如何从源创建可执行文件。当我运行scripts\npm.bat install
时会发生什么?现在我只看到它在一些javascript文件中创建文件夹out
/ out-build
,如下所示。这些文件是什么以及我用它们做了什么?
稍后我尝试运行scripts\code.bat
并创建了一个类似于文件夹.build\electron
上的稳定版本的可执行文件:
但是当我运行npm run watch
时,这个错误就是抛出:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "D:\\User\\Documents\\Nodejs\\bin\\node.exe" "D:\\User\\Documents\\Nodejs\\bin\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! code-oss-dev@1.15.0 watch: `gulp watch --max_old_space_size=4096`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the code-oss-dev@1.15.0 watch script 'gulp watch --max_old_space_size=4096'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the code-oss-dev package,
npm ERR! not with npm itself.
我发现了另一个问题:
但是我无法正确地弄清楚如何构建它。正手我想出了以下设置环境的步骤:
npm install --global --production windows-build-tools
as
管理员。请参阅npm install error - MSB3428: Could not load the Visual C++ component
“VCBuild.exe” git clone https://github.com/Microsoft/vscode
cd vscode
scripts\npm.bat install
npm run watch
档案 npm-debug.log :
1)当我第一次运行命令scripts\npm.bat install
时,这是输出:
F:\vscode>scripts\npm.bat install
2)当我第一次运行命令scripts\npm.bat install
时,这是输出:
F:\vscode>scripts\npm.bat install
3)当我运行命令scripts\code.bat
时,这是输出:
F:\vscode>scripts\code.bat
以下窗口显示:
4)当我按照npm owner ls code-oss-dev
错误消息的要求运行命令npm run watch
时,这是输出:
F:\vscode>npm owner ls code-oss-dev
npm ERR! owner ls Couldn't get owner data code-oss-dev
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "D:\\User\\Documents\\Nodejs\\bin\\node.exe" "D:\\User\\Documents\\Nodejs\\bin\\node_modules\\npm\\bin\\npm-cli.js" "owner" "ls" "code-oss-dev"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/code-oss-dev
npm ERR! 404
npm ERR! 404 'code-oss-dev' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! F:\vscode\npm-debug.log
F:\vscode>
5)当我按照npm bugs code-oss-dev
错误消息的要求运行命令npm run watch
时,这是错误输出:
F:\vscode>npm bugs code-oss-dev
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "D:\\User\\Documents\\Nodejs\\bin\\node.exe" "D:\\User\\Documents\\Nodejs\\bin\\node_modules\\npm\\bin\\npm-cli.js" "bugs" "code-oss-dev"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/code-oss-dev
npm ERR! 404
npm ERR! 404 'code-oss-dev' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! F:\vscode\npm-debug.log
F:\vscode>
6)我还运行了命令gulp
,这是输出:
F:\vscode>gulp
7)当我运行命令gulp compile-client-build
时,这是输出:
F:\vscode>gulp compile-client-build
[08:36:37] Using gulpfile F:\vscode\gulpfile.js
[08:36:37] Starting 'clean-client-build'...
[08:36:37] Finished 'clean-client-build' after 49 ms
[08:36:37] Starting 'compile-client-build'...
[08:36:38] Starting compilation...
[08:50:08] [monaco.d.ts] Starting monaco.d.ts generation
[08:50:12] [monaco.d.ts] Finished monaco.d.ts generation
[08:50:12] Finished compilation with 0 errors after 814540 ms
[08:50:12] Finished 'compile-client-build' after 14 min
8)当我运行命令gulp vscode-win32-ia32
时,这是错误输出:
[02:15:28] Starting 'vscode-win32-ia32'...
internal/streams/legacy.js:59
throw er; // Unhandled stream error in pipe.
^
Error: read ECONNRESET
at exports._errnoException (util.js:1018:11)
at TLSWrap.onread (net.js:568:26)
F:\vscode>gulp vscode-win32-ia32
9)当我运行命令gulp vscode-win32-x64
时,这是错误输出:
[03:02:59] Starting 'vscode-win32-x64'...
internal/streams/legacy.js:59
throw er; // Unhandled stream error in pipe.
^
Error: read ECONNRESET
at exports._errnoException (util.js:1018:11)
at TLSWrap.onread (net.js:568:26)
F:\vscode>gulp vscode-win32-x64
10)当我运行命令npm run gulp -- vscode-win32-ia32
时,这是错误输出:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "D:\\User\\Documents\\Nodejs\\bin\\node.exe" "D:\\User\\Documents\\Nodejs\\bin\\node_modules\\npm\\bin\\npm-cli.js" "run" "gulp" "--" "vscode-win32-ia32"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! code-oss-dev@1.15.0 gulp: `gulp --max_old_space_size=4096 "vscode-win32-ia32"`
npm ERR! Exit status 3
F:\vscode>npm run gulp -- vscode-win32-ia32
上面的命令npm run gulp -- vscode-win32-ia32
的文件 npm-debug.log 。
11)当我运行命令gulp watch --max-old-space-size=4096
时,这是输出,程序挂在这一行:
F:\vscode>gulp watch --max-old-space-size=4096
npm版
F:\vscode>npm --version
3.10.10
F:\vscode>node --version
v6.11.0
F:\vscode>ver
Microsoft Windows [Version 10.0.15063]
F:\vscode>python --version
Python 2.7.13 :: Continuum Analytics, Inc.
最初发布于:Failed at the code-oss-dev@1.15.0 watch script 'gulp watch --max_old_space_size=4096'
相关问题:
答案 0 :(得分:0)
问题似乎是vid.loop = true
使用的过时版本6.11.0
。对于VSCode问题跟踪器上的问题:Failed at the code-oss-dev@1.15.0 watch script 'gulp watch --max_old_space_size=4096',我们可能会按照以下步骤操作:
nodejs
git clean -xfd .
git pull
然后,如果没有错误:
.\scripts\npm.bat install
运行它直到它告诉您编译成功。然后:
npm run watch
答案 1 :(得分:0)
当我尝试按照说明进行操作时,我得到:
const
不知道为什么,但是似乎node-gyp找不到Visual Studio。