November 2021
Hi, I’m trying this tutorial but I’m encountering an error when I try to start Strapi after building the admin:
[2021-11-02T14:22:16.995Z] error /Users/francesco/projects/cpo-strapi/components/MediaLib/index.js:1
import React, { useEffect, useState } from "react";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
any idea on how to fix it? thanks in advance
Francesco
1 reply
November 2021
▶ francescob
Never mind, I was putting files In the wrong place (outside admin/src)
November 2021
Hi, it’s me again.
I’ve got it working now, excellent job with the tutorial. Still, I’m facing a little problem which I hope someone as a solution for:
When I field is mandatory, if you try to save it no validation message appears in the interface, only a message in the js console. Is this problem solvable? thank you very much
November 2021
Hello everyone!
I’ve replaced the default editor successfully and it worked fine after I edited the extended_valid_elements to fit my needs. The only issue I have is that when I run the server with strapi develop --watch-admin or when I change the admin url of the server in config/env/server.js I get the following error:
Uncaught SyntaxError: Unexpected token '<' Uncaught Error: tinymce should have been loaded into global scope
Any ideas on how to resolve this?
November 2021
This worked really well and is a great upgrade.
However, the ‘insert’ function int he tinyMCE toolbar has no knowledge of the media library. It’s just a plain text input form. Where or how would we go about integraeting this with the media library, so images/files can simply be selected from the library?