当前位置:网站首页>【VSCode】SyntaxError: Cannot use import statement outside a module
【VSCode】SyntaxError: Cannot use import statement outside a module
2022-07-27 13:13:00 【Klimsong】
Open the workspace , stay VScode The terminal of runs the following commands :
npm init -y
after , be known as package.json The file will be automatically generated to the root directory of your current workspace , open , Add one type:"module" that will do
{
"name": "javascript",
"version": "1.0.0",
"main": "LC_7.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
}
边栏推荐
- 爱可可AI前沿推介(7.27)
- 事务四大特性(ACID):
- "Game engine light in light out" 4.1 unity shader and OpenGL shader
- 4. Analysis of the execution process of make modules for general purposes
- POJ2446 Chessboard【二分图最大匹配】
- Interviewer: how to deal with the data loss of redis master-slave cluster switching?
- ArrayList常用方法总结
- Eccv2022 | Ru & Google proposed to use clip for zero shot target detection!
- Why does the class annotated with @configuration generate cglib proxy?
- Multi activity disaster recovery construction after 713 failure of station B | takintalks share
猜你喜欢

Will causal learning open the next generation of AI? Chapter 9 Yunji datacanvas officially released the open source project of ylarn causal learning

Security measures for tcp/ip protocol vulnerabilities

概述有名内部类与匿名内部类

Basic architecture of data Lake

Xposed+fdex2 app shelling (black cat complains about app shelling)

js真伪数组转换

C program debugging and exception handling (try catch)

How can the top 500 enterprises improve their R & D efficiency? Let's see what industry experts say!

heap

分布式系统架构理论与组件
随机推荐
JS single thread understanding notes - Original
Aike AI frontier promotion (7.27)
Self built personalized automatic quotation system to cope with changeable quotation mode
js真伪数组转换
JS date and time format (year, month, day, hour, minute, second, week, quarter, time difference acquisition, date and timestamp conversion function)
redis分布式在线安装
Firefox 103 release, faster and more secure
Seata's landing practice in ant International Banking
Security measures for tcp/ip protocol vulnerabilities
Zhongke Lanxun fell 30% on the first day of listing: Huang Zhiqiang, 60, started a company with a market value of 7.7 billion
Eccv2022 | Ru & Google proposed to use clip for zero shot target detection!
BSP video tutorial issue 21: easy one key implementation of serial port DMA variable length transceiver, support bare metal and RTOS, including MDK and IAR, which is more convenient than stm32cubemx (
「游戏引擎 浅入浅出」4.1 Unity Shader和OpenGL Shader
2021-03-15
Is it easy to find a job after programmer training and learning
V. introduction of other objectives and general options
Map interface
Map接口
What are metauniverse and NFT digital collections?
Firefox 103 发布,更快、更安全