【问题标题】:Getting the following build error under iOS在 iOS 下得到以下构建错误
【发布时间】:2018-11-16 15:16:35
【问题描述】:

我正在使用最新的 NS、TNS 和 tns-ios 并收到以下错误

node_modules/tns-core-modules/ui/styling/gradient.d.ts(7,25): error TS6143: Module '../../css/parser' was resolved to '/Users/asrock/Documents/test/node_modules/tns-core-modules/css/parser.js', but '--allowJs' is not set.

我清理了我的项目 - 现在 typescript 编译器失败并退出。

使用 TS 2.4.2。

NS 4.1、TNS-CORE 4.1 和 TNS-IOS 4.1

这是tns build iOS 输出

` 对 Node.js ^6.0.0 的支持已弃用,并将在 NativeScript 的下一版本中删除。请升级到最新的 Node.js LTS 版本。

对 macOS 10.12 的支持已弃用,并将在 NativeScript 的下一版本中删除。请升级到最新的 macOS 版本。

从 /Users/asrock/Documents/test/hooks/before-prepare/nativescript-dev-sass.js 执行 before-prepare 钩子 找到对等节点-sass

从 /Users/asrock/Documents/test/hooks/before-prepare/nativescript-dev-typescript.js 执行 before-prepare 钩子

找到对等 TypeScript 2.4.2

node_modules/tns-core-modules/ui/styling/gradient.d.ts(7,25):错误 TS6143:模块 '../../css/parser' 已解析为 '/Users/asrock/ Documents/test/node_modules/tns-core-modules/css/parser.js',但没有设置'--allowJs'。

TypeScript 编译器失败,退出代码为 1`

【问题讨论】:

    标签: nativescript


    【解决方案1】:

    我遇到了这个错误,我设法修复了它。如果您使用nativescript-angular,您需要将您的角度版本升级到 6 和它的依赖项。

    您可以点击此链接https://www.nativescript.org/blog/upgrading-to-nativescript-webpack-0.12.0Nativescript-corenativescript-angular

    希望这会有所帮助!快乐编码。

    【讨论】:

    • 感谢您的回复 - 但我不是 webpacking。这是一个核心的 JS 项目。我想我是在升级到 4.1 后开始得到这个的。
    • 我进行了完全重新安装,但仍然出现错误。使用 ns、tns-core、iOS 4.1 和 typescript 2.4.2。
    【解决方案2】:

    需要 typescript@2.7.2。

    如果 NS 在某处打印一条消息,那就太好了。

    【讨论】:

      猜你喜欢
      • 2018-11-06
      • 1970-01-01
      • 2017-12-03
      • 2014-05-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多