We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
用 npm install @starcoin/starcoin 后,编写代码
const { utils, encoding, starcoin_types, } = require('@starcoin/starcoin'); console.log(utils)
使用 node .\test.js 出现报错
node:internal/modules/cjs/loader:942 throw err; ^ Error: Cannot find module 'safe-buffer' Require stack: - C:\Users\WGB\Desktop\code\node_modules\@starcoin\starcoin\dist\starcoin.js - C:\Users\WGB\Desktop\code\test.js at Module._resolveFilename (node:internal/modules/cjs/loader:939:15) at Module._load (node:internal/modules/cjs/loader:780:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (C:\Users\WGB\Desktop\code\node_modules\@starcoin\starcoin\dist\starcoin.js:2962:16) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Module._load (node:internal/modules/cjs/loader:827:12) at Module.require (node:internal/modules/cjs/loader:1005:19) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\\Users\\WGB\\Desktop\\code\\node_modules\\@starcoin\\starcoin\\dist\\starcoin.js', 'C:\\Users\\WGB\\Desktop\\code\\test.js' ] } Node.js v18.1.0
The text was updated successfully, but these errors were encountered:
可以提供一份完整的代码仓库me @WGB5445
Sorry, something went wrong.
test.js
不确定是不是 nodejs 太新的缘故
重新安装环境以后这个问题消失了,我考虑可能是由于在 yarn 或者 npm 时网络中断导致的 'safe-buffer' 并未下载
No branches or pull requests
用 npm install @starcoin/starcoin 后,编写代码
使用 node .\test.js 出现报错
The text was updated successfully, but these errors were encountered: