当前位置:网站首页>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

边栏推荐
- Implementation and debug of process hiding under x64
- Player practice 15 xdemux and avcodecparameters
- Huawei equipment is configured with H virtual private network
- C secret arts script Chapter 2 (detailed explanation of pointers) (Section 3)
- Why do Chinese programmers change jobs?
- To SystemC Beginners: the first program
- Software package for optimization scientific research field
- 注重点击,追求更多用户进入网站,可以选择什么出价策略?
- 基于Profibus-DP协议的PLC智能从站设计
- C secret script Chapter 1: data storage (in-depth analysis)
猜你喜欢

程序分析与优化 - 6 循环优化

动态搜索广告智能查找匹配关键字

注重点击,追求更多用户进入网站,可以选择什么出价策略?

C secret arts script Chapter 5 (paragraph) (Section 3)

Detailed explanation of C language memset

对某热水软件的加密参数逆向

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

Ppt cannot be opened, always prompt how to fix it

For cross-border e-commerce, the bidding strategy focusing more on revenue - Google SEM

【OCR】AspriseOCR C# 英文、数字识别(中文不行)
随机推荐
[early knowledge of activities] list of recent activities of livevideostack
Player actual combat 23 decoding thread
Brush one question every day /537 Complex multiplication
Word insert picture blocked by text
Leetcode 2185. Counts the string containing the given prefix
Llvm pass-- virtual function protection
And, or, not equal, operator
Printing colored messages on the console with printf
如何使用android studio制作一个阿里云物联网APP
Tcp/ip network communication knowledge record
QT to realize the simple use of SQLite database
How to use Android studio to create an Alibaba cloud Internet of things app
SystemC:SC_ Thread and SC_ METHOD
TestEngine with ID ‘junit-vintage‘ failed to discover tests
什么是自动出价?它的优势是什么?
Redis core configuration and advanced data types
Write policy of cache
面向优化科学研究领域的软件包
Getting started alicloud haas510 open board DTU (version 2.0) --510-as
Tool notes - common custom tool classes (regular, random, etc.)