I have installed the following packages @adminjs/express: ^6.0.0
, @adminjs/mongoose: 4.0.0
, and adminjs: ^7.0.0
. In my app.js
file I am importing them as per the docs as follows:
import AdminJS from 'adminjs'
import * as AdminJSExpress from '@adminjs/express'
But when I run the app I get the following error:
file:///C:/Users/USER01/github/express-template/node_modules/adminjs/lib/locale/index.js:1
import deLocale from './de/translation.json' assert { type: 'json' };
^^^^^^
SyntaxError: Unexpected identifier
at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18)
Can anyone help?
In my package.json
I have set "type":"module"
. My node version is v14.17.3