当前位置:网站首页>JS (II) syntaxerror: cannot use import statement outside a module
JS (II) syntaxerror: cannot use import statement outside a module
2022-06-12 14:28:00 【Makasa】
Preface
This chapter focuses on js Report mistakes SyntaxError: Cannot use import statement outside a module The solution of the
One 、 Problem description
- problem : seeing the name of a thing one thinks of its function , Translate according to the error message 【 You cannot use import statements outside a module 】, Error reporting import { v4 as uuidv4 } from 'uuid’ The import statement is outside the module

Two 、 resolvent
- Because it is outside the module , We change package.json that will do , Add... To the file 【“type”: “module”】
"type": "module"

3、 ... and 、 View results
see 1) Rerun
- Rerun the code without reporting an error

边栏推荐
- If you want to build brand awareness, what bidding strategy can you choose?
- 【活动早知道】LiveVideoStack近期活动一览
- C secret arts script Chapter 2 (detailed explanation of pointers) (Section 3)
- OAuth2学习中的一些高频问题的QA
- 面向优化科学研究领域的软件包
- Huawei equipment configuration BGP as number replacement
- Introduction to functions (inline functions and function overloading)
- IAT hook hijacking process API call
- Player practice 26 adding slider and window maximization
- NotePad 常用设置
猜你喜欢

Reverse the encryption parameters of a hot water software

G++ error in compiling Win32 program: undefined reference to '__ imp_ GetStockObject‘

Redis核心配置和高级数据类型

PostgreSQL14安装使用教程

如果要打造品牌知名度,可以选择什么出价策略?

Leetcode 2185. Counts the string containing the given prefix

初学者入门阿里云haas510开板式DTU(2.0版本)--510-AS

Ppt cannot be opened, always prompt how to fix it

Pay attention to click and pursue more users to enter the website. What bidding strategy can you choose?

Player practice 20 unpacking thread
随机推荐
Player actual combat 13 create qtopengl project to promote window control and reload qoopenglwedge
工业机械臂(机器人)视觉定位引导系统
Sorting out the differences between ABS () and Fabs () in C language
G++ error in compiling Win32 program: undefined reference to '__ imp_ GetStockObject‘
Is Shell Scripting really a big technology?
Dynamic search advertising intelligent search for matching keywords
Visual studio common shortcuts
The original Xiaoyuan personal blog project that has been around for a month is open source (the blog has basic functions, including background management)
Basic usage of scanner
2022版Redis数据删除策略
SystemC time
Player practice 11 audio resampling
【OCR】AspriseOCR C# 英文、数字识别(中文不行)
How to realize the bidding strategy that pays more attention to transformation in the company's operation Google sem
Analysis of two-dimensional array passing as function parameter (C language)
Player actual combat 21 audio and video synchronization
【MySQL】数据库基本操作
Player practice 20 audio thread and video thread
And, or, not equal, operator
Two methods of implementing asynchronous calling function with QT