代码很简单,好像就是定义了一个函数
试着按照 chatgpt 给的建议用node:14在 docker 运行 exampel code ,但报错
> const twitterGetUrl = require("twitter-url-direct")
Uncaught TypeError: Assignment to constant variable.
at Object. (/node_modules/twitter-url-direct/src/index.js:2:32)
at Module._compile (internal/modules/cjs/loader.js:1114:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:979:32)
at Function.Module._load (internal/modules/cjs/loader.js:819:12)
at Module.require (internal/modules/cjs/loader.js:1003:19)
at require (internal/modules/cjs/helpers.js:107:18)
想求助各位是环境的问题还是啥问题?我完全不懂 js ,轻喷