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)
1146 ワード
Origin Source Code)
package.jsonに「type」:「module」を追加
Solution Source Code)
{
...
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@solana/spl-token": "^0.2.0",
"@solana/web3.js": "^1.36.0"
}
}
Warning Message)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)
set "type": "module"in the package.jsonpackage.jsonに「type」:「module」を追加
Solution Source Code)
{
...
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@solana/spl-token": "^0.2.0",
"@solana/web3.js": "^1.36.0"
}
}
Reference
この問題について(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)), 我々は、より多くの情報をここで見つけました https://velog.io/@johnnyji/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テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol