atularen / ngx-monaco-editor

Monaco Editor component for Angular 2 and Above
https://www.npmjs.com/package/ngx-monaco-editor
MIT License
428 stars 155 forks source link

Glob Doesn't Exist ngx-monaco-editor/assets/monaco #189

Open austenstone opened 4 years ago

austenstone commented 4 years ago

I can't seem to generate the assets glob for monaco using "ngx-monaco-editor": "^10.0.0-beta.1".

I created an empty angular app and followed the instructions in the ReadMe. https://github.com/astone2014/ngx-monaco-editor

The glob isn't copied on build (prod or dev). I'm not sure where it is even located.

$ ls node_modules/ngx-monaco-editor/assets/monaco
ls: cannot access 'node_modules/ngx-monaco-editor/assets/monaco': No such file or directory

This is what's in module:

$ ls node_modules/ngx-monaco-editor/
README.md     ngx-monaco-editor.d.ts
__ivy_ngcc__  ngx-monaco-editor.d.ts.__ivy_ngcc_bak
bundles       ngx-monaco-editor.d.ts.map
esm2015       ngx-monaco-editor.metadata.json
fesm2015      package.json
lib           public-api.d.ts

Is the ReadMe outdated? Maybe the beta version I'm using is not healthy?

I have had success with ngx-monaco-editor in the past, it just worked. Now I can't find the glob necessary to load the Monaco.

austenstone commented 4 years ago

So I realize version 9 has the assets

$ npm install ngx-monaco-editor@9.0.0 --save
$ ls node_modules/ngx-monaco-editor/assets/monaco/vs/
base  basic-languages  editor  language  loader.js

How do I run version 10? Looks like you guys are making some good changes.

tm4g1x commented 4 years ago

I faced the same. Also went to 9.0.0 version. Seems something changed with v 10.

Carnageous commented 4 years ago

I run into this problem even in v9.0.0. I tried using

{
  "glob": "**/*",
  "input": "../node_modules/ngx-monaco-editor/assets/monaco",
  "output": "./assets/monaco/"
}

as well as variations of the paths in angular.json (projects > project > architect > build > options > assets), without success.

pavel-r-rashkov commented 4 years ago

I had the same issues with v10, switching to 9.0.0 helped. @Carnageous try using "node_modules/ngx-monaco-editor/assets/monaco" instead of "../node_modules/ngx-monaco-editor/assets/monaco".

rogerfar commented 4 years ago

@atul-wizni could you please pull the 10.0 beta from NPM and mark it as a pre-release, it's far from ready to be used. Every time we upgrade packages it gets installed again and breaks everything.

DibyodyutiMondal commented 4 years ago

To me, it looks like they intended to make monaco-editor a peer dependency in the v10 release... I'll see what works and post updates...

62mkv commented 3 years ago

is there any way to use this w/Angular 10? assets are not working for me even when I install 9.0.0 version of this package...

EDIT: there is a way. I just had to use Webpack CopyWebpackPlugin to achieve that..