Page 1 of 1

Can't Access node_modules under wwwroot folder

Posted: Thu Apr 28, 2022 9:36 pm
by futureaxs

I need to use textarea for my project.

In edit field i selected HTML editor - Generated & Published Code.

But Under wwwroot folder i can't access "node_modules/tinymce/tinymce.min.js" But is already available in same path.
Because of this i can't able get HTML Editor above my textarea.

ERROR follows

ewcore.js:156 GET https://xxxxxx.xxxxx.com/node_modules/t ... mce.min.js net::ERR_ABORTED 404
ewcore.js:1182 ['/node_modules/tinymce/tinymce.min.js']
eweditor.js:5 Uncaught ReferenceError: tinymce is not defined
at eweditor.js:5:1

Any suggestions. I am using 2022.4


Re: Can't Access node_modules under wwwroot folder

Posted: Fri Apr 29, 2022 7:32 am
by MichaelG

The files should be generated by npm update at the end of the generation. Did you see any errors during the generation process?

You can test your npm by opening a command prompt at the wwwroot folder and then run "npm update".


Re: Can't Access node_modules under wwwroot folder

Posted: Fri Apr 29, 2022 7:21 pm
by futureaxs

There are no errors while Generating Code. Even Build & Publish has no errors in VS 2022.
I also tried "npm update".

getting
up to date, audited 2 packages in 2s
found 0 vulnerabilities

package.json as follows :

"name": "xxxxx",
"version": "19.4.0",
"description": "xxxxx",
"license": "SEE LICENSE IN LICENSE.md",
"private": true,
"dependencies": {
"tinymce": "5.10.0"
},
"engines": {
"node": ">=16"
}


Re: Can't Access node_modules under wwwroot folder

Posted: Fri Apr 29, 2022 7:31 pm
by futureaxs

as temp solutions copied tinymce folder from node_modules to js folder and changed path in _Layout.cshtml

Now it's working fine no errors.