Uncaught SyntaxError: Unexpected token import
See original GitHub issueAfter i edit the src/App.js with the example in the Getting Started, i get this error : Uncaught SyntaxError: Unexpected token import
It originates from the line import _AdminBuilder from './AdminBuilder';
Seen here :
/* 268 */
/*!*******************************************!*\
!*** ./~/api-platform-admin/lib/index.js ***!
\*******************************************/
/***/ function(module, exports) {
import _AdminBuilder from './AdminBuilder';
export { _AdminBuilder as AdminBuilder };
import _Create from './Create';
export { _Create as Create };
import _Edit from './Edit';
export { _Edit as Edit };
import _fieldFactory from './fieldFactory';
export { _fieldFactory as fieldFactory };
import _inputFactory from './inputFactory';
export { _inputFactory as inputFactory };
import _List from './List';
export { _List as List };
import _Show from './Show';
export { _Show as Show };
export * from './hydra';
I also get several warnings from the yarn add api-platform-admin command :
yarn add api-platform-admin
yarn add v0.27.5
[1/4] Resolving packages...
warning api-platform-admin > lodash.isarray@4.0.0: This package is deprecated. Use Array.isArray.
[2/4] Fetching packages...
warning fsevents@1.0.17: The platform "linux" is incompatible with this module.
info "fsevents@1.0.17" is an optional dependency and failed compatibility check. Excluding it from installation.
warning fsevents@1.1.2: The platform "linux" is incompatible with this module.
info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 66 new dependencies.
Could it come from these ?
Regards,
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Uncaught SyntaxError: Unexpected token import - Stack ...
Then I changed my main script tag to import it as a module and it was working, but I still received the error....
Read more >SyntaxError: Unexpected token import in Node.js | bobbyhadz
The "SyntaxError: Unexpected token import" occurs when we use the ES6 import syntax in a version of Node that doesn't support it. To...
Read more >Nodejs Uncaught SyntaxError: Unexpected token import
An unexpected token import occurs when an error message appears in the console while running a web application.
Read more >JavaScript ES6 - How to fix Unexpected token import - YouTube
This video is a short explanation on how to fix the syntax error : " Unexpected Token Import "Hint: type="module"
Read more >SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think I have the rights.
Should be fixed now.