当我尝试运行jupyter lab build时出现错误。我尝试卸载jupyterlab并重新安装它,我也尝试了整个anaconda的方法。我在Windows 10上运行它。错误如下:
[LabBuildApp] JupyterLab 3.0.4
[LabBuildApp] Building in c:\users\acrul\anaconda3\share\jupyter\lab
[LabBuildApp] Building jupyterlab assets (production, minimized)
Build failed.
Troubleshooting: If the build failed due to an out-of-memory error, you
may be able to fix it by disabling the `dev_build` and/or `minimize` options.
If you are building via the `jupyter lab build` command, you can disable
these options like so:
jupyter lab build --dev-build=False --minimize=False
You can also disable these options for all JupyterLab builds by adding these
lines to a Jupyter config file named `jupyter_config.py`:
c.LabBuildApp.minimize = False
c.LabBuildApp.dev_build = False
If you don't already have a `jupyter_config.py` file, you can create one by
adding a blank file of that name to any of the Jupyter config directories.
The config directories can be listed by running:
jupyter --paths
Explanation:
- `dev-build`: This option controls whether a `dev` or a more streamlined
`production` build is used. This option will default to `False` (i.e., the
`production` build) for most users. However, if you have any labextensions
installed from local files, this option will instead default to `True`.
Explicitly setting `dev-build` to `False` will ensure that the `production`
build is used in all circumstances.
- `minimize`: This option controls whether your JS bundle is minified
during the Webpack build, which helps to improve JupyterLab's overall
performance. However, the minifier plugin used by Webpack is very memory
intensive, so turning it off may help the build finish successfully in
low-memory environments.
An error occured.
RuntimeError: JupyterLab failed to build
See the log file for details: C:\Users\acrul\AppData\Local\Temp\jupyterlab-debug-9xkqhcqu.log和日志文件。我假设错误在这里: webpack-cli31mTypeError:‘(c:\users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\webpack\lib\javascript\JavascriptModulesPlugin.js:119:10)’参数必须是Function.getCompilationHooks编译的实例
[LabBuildApp] Building in c:\users\acrul\anaconda3\share\jupyter\lab
[LabBuildApp] Node v14.15.4
[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Building jupyterlab assets (production, minimized)
[LabBuildApp] > node c:\users\acrul\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js install --non-interactive
[LabBuildApp] yarn install v1.21.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.3.1: The platform "win32" is incompatible with this module.
info "fsevents@2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "@jupyterlab/extensionmanager > react-paginate@6.5.0" has incorrect peer dependency "react@^16.0.0".
warning "@jupyterlab/json-extension > react-highlighter@0.4.3" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@jupyterlab/json-extension > react-json-tree@0.12.1" has incorrect peer dependency "react@^16.3.0".
warning "@jupyterlab/json-extension > react-json-tree@0.12.1" has incorrect peer dependency "react-dom@^16.3.0".
warning "@jupyterlab/ui-components > @blueprintjs/core > react-popper@1.3.7" has incorrect peer dependency "react@0.14.x || ^15.0.0 || ^16.0.0".
warning "@jupyterlab/ui-components > @blueprintjs/core > react-popper > create-react-context@0.3.0" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@jupyterlab/vdom > @nteract/transform-vdom@4.0.16-alpha.0" has incorrect peer dependency "react@^16.3.2".
warning " > @lumino/coreutils@1.5.3" has unmet peer dependency "crypto@1.0.1".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 5.77s.
[LabBuildApp] > node c:\users\acrul\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js yarn-deduplicate -s fewer --fail
[LabBuildApp] yarn run v1.21.1
$ c:\users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\.bin\yarn-deduplicate -s fewer --fail
Done in 0.45s.
[LabBuildApp] > node c:\users\acrul\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js run build:prod:minimize
[LabBuildApp] yarn run v1.21.1
$ webpack --config webpack.prod.minimize.config.js
[webpack-cli] [31mTypeError: The 'compilation' argument must be an instance of Compilation
at Function.getCompilationHooks (c:\users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\webpack\lib\javascript\JavascriptModulesPlugin.js:119:10)
at c:\users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\terser-webpack-plugin\dist\index.js:566:67
at _next35 (eval at create (c:\Users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:40:1)
at _next13 (eval at create (c:\Users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:97:1)
at Hook.eval [as call] (eval at create (c:\Users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:127:1)
at Hook.CALL_DELEGATE [as _call] (c:\Users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\tapable\lib\Hook.js:14:14)
at Compiler.newCompilation (c:\Users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\webpack\lib\Compiler.js:988:26)
at c:\Users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\webpack\lib\Compiler.js:1030:29
at Hook.eval [as callAsync] (eval at create (c:\Users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (c:\Users\acrul\anaconda3\share\jupyter\lab\staging\node_modules\tapable\lib\Hook.js:18:14)[39m
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[LabBuildApp] JupyterLab failed to build
[LabBuildApp] Traceback (most recent call last):
[LabBuildApp] File "c:\users\acrul\anaconda3\lib\site-packages\jupyterlab\debuglog.py", line 47, in debug_logging
yield
[LabBuildApp] File "c:\users\acrul\anaconda3\lib\site-packages\jupyterlab\labapp.py", line 168, in start
raise e
[LabBuildApp] File "c:\users\acrul\anaconda3\lib\site-packages\jupyterlab\labapp.py", line 164, in start
build(name=self.name, version=self.version,
[LabBuildApp] File "c:\users\acrul\anaconda3\lib\site-packages\jupyterlab\commands.py", line 463, in build
return handler.build(name=name, version=version, static_url=static_url,
[LabBuildApp] File "c:\users\acrul\anaconda3\lib\site-packages\jupyterlab\commands.py", line 675, in build
raise RuntimeError(msg)
[LabBuildApp] RuntimeError: JupyterLab failed to build
[LabBuildApp] Exiting application: JupyterLab发布于 2021-01-19 16:16:11
不确定我是如何解决这个问题的,但我反复以admin身份运行这些程序
jupyter lab clean
jupyter lab clean --all
pip uninstall jupyterlab
pip install jupyterlab然后还从另一个文件夹启动了jupyter lab服务器。
https://stackoverflow.com/questions/65771028
复制相似问题