Tencent / tlbs-map-vue

基于腾讯位置服务 JavaScript API 封装的 Vue 版地图组件库
Other
95 stars 4 forks source link

Vue 2.0版本无法使用地图 #2

Closed zkguanjia closed 1 month ago

zkguanjia commented 2 months ago

tlbs-map-vue 版本

1.1.0

重现链接

No response

重现步骤

No response

期望结果

No response

实际结果

No response

框架版本

Vue2.6.10

浏览器版本

No response

补充说明

No response

zkguanjia commented 2 months ago

提示错误如下: internal/modules/cjs/loader.js:895 throw err; ^

Error: Cannot find module 'node:path' Require stack:

[npminstall:runscript:error] tlbs-map-vue@latest scripts.postinstall run "node scripts/postinstall.js" error: Error [RunScriptError]: Run "sh -c node scripts/postinstall.js" error, exit code 1 at ChildProcess. (/usr/local/lib/node_modules/cnpm/node_modules/runscript/index.js:114:21) at ChildProcess.emit (events.js:314:20) at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) { stdio: [Object], exitcode: 1 } ✖ Install fail! RunScriptError: post install error, please remove node_modules before retry! Run "sh -c node scripts/postinstall.js" error, exit code 1 RunScriptError: Run "sh -c node scripts/postinstall.js" error, exit code 1 at ChildProcess. (/usr/local/lib/node_modules/cnpm/node_modules/runscript/index.js:114:21) at ChildProcess.emit (events.js:314:20) at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) npminstall version: 5.8.1 npminstall args: /usr/local/bin/node /usr/local/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --fix-bug-versions --china --userconfig=/Users/apple/.cnpmrc --disturl=https://npmmirror.com/mirrors/node --registry=https://registry.npmmirror.com tlbs-map-vue

mimaster commented 2 months ago

"node:path"是node 16以上版本才有的别名,你是node版本太低了

egbertshendong commented 1 month ago

需要将Node版本升级到16及以上