Код: Выделить всё
SyntaxError: Cannot use import statement outside a module
< /code>
А полное сообщение: < /p>
(node:11) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:11) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
/var/task/wh100/frontend/src/index.js:1
import React from 'react'
^^^^^^
SyntaxError: Cannot use import statement outside a module
Код: Выделить всё
ERROR in ./src/index.mjs 7:0-24
Module not found: Error: Can't resolve './App' in '/home/joshua/Documents/private_voti/voti/wh100/frontend/src'
Did you mean 'App.js'?
BREAKING CHANGE: The request './App' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
Подробнее здесь: https://stackoverflow.com/questions/795 ... -in-vercel