微信小程序引入ali-oss,报tty的错,请问该如何解决?
发布于 5 年前 作者 fsun 10652 次浏览 来自 问答

1.npm init;

2.npm install ali-oss --save;

3.工具-》构建

然后就报下面的错

无视上面的对话框后,引入ali-oss又会报tyy的错。真是无语,网上也搜不到相关的,

把node_modules和miniprogram_npm删了重新install和构建,也是一样的报错。。

报错内容:

VM1116:1 thirdScriptError
module "miniprogram_npm/debug/tty" is not defined
Error: module "miniprogram_npm/debug/tty" is not defined
    at require (http://127.0.0.1:36385/appservice/__dev__/WAService.js:2:1685044)
    at http://127.0.0.1:36385/appservice/__dev__/WAService.js:2:1684795
    at __REQUIRE__ (http://127.0.0.1:36385/appservice/miniprogram_npm/debug/index.js:23:34)
    at http://127.0.0.1:36385/appservice/miniprogram_npm/debug/index.js:698:12
    at Object.func (http://127.0.0.1:36385/appservice/miniprogram_npm/debug/index.js:467:15)
    at __REQUIRE__ (http://127.0.0.1:36385/appservice/miniprogram_npm/debug/index.js:31:23)
    at http://127.0.0.1:36385/appservice/miniprogram_npm/debug/index.js:94:12
    at Object.func (http://127.0.0.1:36385/appservice/miniprogram_npm/debug/index.js:87:24)
    at __REQUIRE__ (http://127.0.0.1:36385/appservice/miniprogram_npm/debug/index.js:31:23)
    at http://127.0.0.1:36385/appservice/miniprogram_npm/debug/index.js:701:10

求助各路神仙。

1 回复

小程序node版本的问题吧,这个写法不支持

回到顶部