Comments (11)
(In fact, if you're just using the extension instead of developing it, you could do jupyter labextension install .
instead of linking it)
from jupyterlab-monaco.
You should get a Monaco editor when you open a non-notebook file. At least the first time you open it it should work. The current implementation is a very blunt one. You can recognize it by the minimap on the right hand side.
Any luck?
from jupyterlab-monaco.
You don't need to have a dev install of jupyterlab, and you don't need the nb_conda_kernels. This should work:
conda create -c conda-forge -n monaco jupyterlab nodejs
conda activate monaco
git clone https://github.com/jupyterlab/jupyterlab-monaco.git
cd jupyterlab-monaco
npm install
npm run build
jupyter labextension link .
from jupyterlab-monaco.
Thanks a lot! I thought I'd get a dev install of JupyterLab in case something needed changing over there as well. I'll try it right away and let you know how it goes.
from jupyterlab-monaco.
I passed the install and build with some minor warnings, but the jupyter labextension link .
hangs indefinitely.
Here's my terminal log:
(monaco) tiemen@LAPTOP:/mnt/d/jupyterlab/jupyterlab-monaco$ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 84 packages in 16.002s
(monaco) tiemen@LAPTOP:/mnt/d/jupyterlab/jupyterlab-monaco$ npm run build
> [email protected] build /mnt/d/jupyterlab/jupyterlab-monaco
> webpack && tsc
Hash: 7ed530f81ebe883f2526
Version: webpack 4.6.0
Time: 8089ms
Built at: 2018-04-21 15:35:05
Asset Size Chunks Chunk Names
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-css.worker.bundle.js.map 1.52 MiB css.worker [emitted] css.worker
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-css.worker.bundle.js 1.43 MiB css.worker [emitted] css.worker
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-html.worker.bundle.js 832 KiB html.worker [emitted] html.worker
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-json.worker.bundle.js 749 KiB json.worker [emitted] json.worker
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-ts.worker.bundle.js 7.85 MiB ts.worker [emitted] ts.worker
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-0.bundle.js 918 bytes 0 [emitted]
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-editor.worker.bundle.js 453 KiB editor.worker [emitted] editor.worker
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-editor.worker.bundle.js.map 468 KiB editor.worker [emitted] editor.worker
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-html.worker.bundle.js.map 887 KiB html.worker [emitted] html.worker
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-json.worker.bundle.js.map 769 KiB json.worker [emitted] json.worker
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-ts.worker.bundle.js.map 8.78 MiB ts.worker [emitted] ts.worker
JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-0.bundle.js.map 690 bytes 0 [emitted]
Entrypoint editor.worker = JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-editor.worker.bundle.js JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-editor.worker.bundle.js.map
Entrypoint json.worker = JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-json.worker.bundle.js JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-json.worker.bundle.js.map
Entrypoint css.worker = JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-css.worker.bundle.js JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-css.worker.bundle.js.map
Entrypoint html.worker = JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-html.worker.bundle.js JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-html.worker.bundle.js.map
Entrypoint ts.worker = JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-ts.worker.bundle.js JUPYTERLAB_FILE_LOADER_jupyterlab-monaco-ts.worker.bundle.js.map
[./node_modules/monaco-editor/esm/vs/editor/common/services sync recursive] ./node_modules/monaco-editor/esm/vs/editor/common/services sync 160 bytes {0} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 489 bytes {ts.worker} {html.worker} {css.worker} {json.worker} {editor.worker} [built]
[./node_modules/webpack/buildin/harmony-module.js] (webpack)/buildin/harmony-module.js 573 bytes {ts.worker} [built]
+ 111 hidden modules
WARNING in ./node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js
378:12-387:17 Critical dependency: the request of a dependency is an expression
@ ./node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js
@ ./node_modules/monaco-editor/esm/vs/editor/editor.worker.js
(monaco) tiemen@LAPTOP:/mnt/d/jupyterlab/jupyterlab-monaco$ jupyter labextension link .
> /mnt/c/miniconda3/envs/monaco/bin/npm pack /mnt/d/jupyterlab/jupyterlab-monaco
jupyterlab-monaco-0.1.0.tgz
> /mnt/c/miniconda3/envs/monaco/bin/npm pack /mnt/d/jupyterlab/jupyterlab-monaco
jupyterlab-monaco-0.1.0.tgz
> /mnt/c/miniconda3/envs/monaco/bin/npm pack /mnt/d/jupyterlab/jupyterlab-monaco
jupyterlab-monaco-0.1.0.tgz
> node /mnt/c/miniconda3/envs/monaco/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@jupyterlab/json-extension > [email protected]" has incorrect peer dependency "react@^15.0.0".
warning "@jupyterlab/json-extension > [email protected]" has incorrect peer dependency "react-dom@^15.0.0".
warning "@jupyterlab/vdom-extension > @nteract/[email protected]" has incorrect peer dependency "react@^15.6.1".
error An unexpected error occurred: "ENOENT: no such file or directory, copyfile '/home/tiemen/.cache/yarn/v1/npm-monaco-editor-0.12.0-cd8621017526b57746245104d764bbf52ad42283/esm/vs/basic-languages/yaml/yaml.contribution.js' -> '/mnt/c/miniconda3/envs/monaco/share/jupyter/lab/staging/node_modules/monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution.js'".
info If you think this is a bug, please open a bug report with the information provided in "/mnt/c/miniconda3/envs/monaco/share/jupyter/lab/staging/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
> node /mnt/c/miniconda3/envs/monaco/lib/python3.6/site-packages/jupyterlab/staging/yarn.js run build:prod
yarn run v1.5.1
$ webpack --config webpack.prod.config.js
from jupyterlab-monaco.
So, just for clarity: the current workaround is to run the final command with the --dev
flag until the webpack issue is resolved.
conda create -c conda-forge -n monaco jupyterlab nodejs
conda activate monaco
git clone https://github.com/jupyterlab/jupyterlab-monaco.git
cd jupyterlab-monaco
npm install
npm run build
jupyter labextension link . --dev
from jupyterlab-monaco.
I have tried to follow the same steps in Vagrant environment to create a JL environment with the editor. JupyterLab seems to load the app:
[I 18:58:49.320 LabApp] > /usr/bin/npm pack /home/vagrant/jupyterlab-monaco
jupyterlab-monaco-0.1.0.tgz
Within the JupyterLab itself, I can see Monaco Editor but am not able to open it (i.e. search bar displays it but clicking on it does nothing). I also tried re-building all the extensions from the scratch but with no effect.
Here is the full provisioning script I am using on Ubuntu 16.04 platform (Vagrant)
# Update system and install additional required packages
sudo apt-get update
# Install new Python
sudo apt-get install build-essential checkinstall -y
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev -y
# Install node
sudo curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install nodejs -y
# Install git
sudo apt-get install git -y
# Install new Python
sudo apt-get install build-essential checkinstall -y
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev -y
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
tar xvf Python-3.6.5.tar.xz
cd Python-3.6.5
./configure
sudo make altinstall
# Install node
sudo curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install nodejs -y
# Install basic packages
sudo pip3.6 install numpy scipy matplotlib ipython jupyter sklearn
sudo pip3.6 install jupyterlab
# Install jupyter-monaco
sudo git clone https://github.com/jupyterlab/jupyterlab-monaco.git
cd jupyterlab-monaco/
sudo npm install
sudo npm run build
sudo jupyter labextension link .
from jupyterlab-monaco.
Yes this works. There is no launcher access but when I open the non-notebook file it uses the Monaco editor. Thank you very much!
from jupyterlab-monaco.
Hi,
@jasongrout I tried to install using the instruction you gave in the comment in this issue, but I got an error when running:
npm run build
I am on windows 10 and I am attaching the log.
2018-07-12T11_54_43_256Z-debug.log
from jupyterlab-monaco.
I've also failed to install the extension using the instructions above, failing on npm run build
too.
Here is my traceback:
(monaco) krassowski@localhost:~/jupyterlab-monaco$ npm run build
> jupyterlab-monaco@0.2.0 build /home/krassowski/jupyterlab-monaco
> webpack && tsc
/home/krassowski/jupyterlab-monaco/node_modules/webpack-cli/bin/config-yargs.js:89
describe: optionsSchema.definitions.output.properties.path.description,
^
TypeError: Cannot read property 'properties' of undefined
at module.exports (/home/krassowski/jupyterlab-monaco/node_modules/webpack-cli/bin/config-yargs.js:8
at /home/krassowski/jupyterlab-monaco/node_modules/webpack-cli/bin/webpack.js:60:27
at Object.<anonymous> (/home/krassowski/jupyterlab-monaco/node_modules/webpack-cli/bin/webpack.js:51
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
EDIT: Updating webpack-cli
dependency to 3.1.1 - as suggested by webpack/webpack-cli#607 (comment) - solved the problem.
from jupyterlab-monaco.
EDIT: Updating
webpack-cli
dependency to 3.1.1 - as suggested by webpack/webpack-cli#607 (comment) - so
Hi @krassowski , I have the same error as yours at the npm run build
stage. But I am not familiar with npm.
So I tried
npm update [email protected]
npm install
npm run build
but still got the same error, i,e,
TypeError: Cannot read property 'properties' of undefined
at module.exports (/root/jupyterlab-monaco/node_modules/webpack-cli/bin/config-yargs.js:89:48)
at /root/jupyterlab-monaco/node_modules/webpack-cli/bin/webpack.js:60:27
at Object.<anonymous> (/root/jupyterlab-monaco/node_modules/webpack-cli/bin/webpack.js:515:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
Could you provide some help?
Edit: The error is gone by using npm install [email protected]
.
But I do not know how to select the editor in jupyter lab.
from jupyterlab-monaco.
Related Issues (19)
- Consider using webpack plugin for monaco HOT 2
- Installation in jupyterlab dev mode HOT 2
- Is there a plan to continue developing this extension? HOT 2
- LSP (language server protocol) integration HOT 4
- Upgrade jupyterlab depedencies to work with jupyterlab 0.33.0
- Publish to npm HOT 10
- Another implementation of monaco in jupyterlab HOT 3
- "[email protected]" is not compatible with the current JupyterLab HOT 3
- Highlighting?
- Connect console to Monacro editor
- open python file with Monaco Editor does work
- Did this get abandoned? HOT 4
- How to install on jupyterlab version > 1.0.0 ? HOT 1
- Building Error: error TS2420: Class 'RenderedCommon' incorrectly implements interface 'IRenderer'. HOT 4
- Archiving this repository HOT 2
- Editor theme and key map not applied to Monaco? HOT 1
- Editor fails to start at the second time HOT 1
- Screenshots for a demo? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jupyterlab-monaco.