技术文章 - CS358656

ThingWorx Web 组件教程中遇到的错误

已修改: 11-Nov-2024   


注意:本文已使用机器翻译软件翻译,以方便非英语客户阅读。但翻译内容可能包含语法错误或不准确之处。请注意, PTC对本文所含信息的翻译准确性及使用后果不承担任何责任。请在 此处 查看本文的英文原始版本以便参考。有关机器翻译的更多详情,请单击 此处
感谢您告诉我们。我们将尽快审阅此译文。

适用于

  • ThingWorx Platform 8.5 to 9.3

说明

  • ThingWorx Web 组件教程中出现错误
  • 运行 Visual SDK 的mub会导致错误
  • 遇到的错误:
    • 错误 1:
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/twx-wc-sdk/ptcs-library.git
npm ERR! Warning: Permanently added 'github.com,140.82.114.3' (ECDSA) to the list of known hosts.
npm ERR! ERROR: Repository not found.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
    • 错误2:
$ mub
Starting series of gulp tasks for the wrapping...

exec error: Error: Command failed: gulp --e --wd /mnt/c/Users/ferti/GitHub/simple-el-widget
ReferenceError: primordials is not defined
    at fs.js:47:5
    at req_ (/mnt/c/Users/ferti/Downloads/twx-wc-sdk-utility/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/mnt/c/Users/ferti/Downloads/twx-wc-sdk-utility/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/mnt/c/Users/ferti/Downloads/twx-wc-sdk-utility/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    • 错误 3:
$ mub
exec error: Error: Command failed: gulp --e --wd C:\Users\<USER>\Downloads\work\simple-el-widget -LLLL
'task_modifyPtcsMoment' errored after 676 μs
Error: ENOENT: no such file or directory, rename 
    • 错误 4:
$ mub
Starting series of gulp tasks for the wrapping...

exec error: Error: Command failed: gulp --e --wd C:\Users\<USER>\Downloads\work\simple-el-widget
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\<USER>\node_modules\vinyl-paths\index.js from C:\Users\<USER>\Downloads\work\twx-wc-sdk-utility\gulpfile.js not supported.
Instead change the require of index.js in C:\Users\<USER>\Downloads\work\twx-wc-sdk-utility\gulpfile.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (C:\Users\<USER>\Downloads\work\twx-wc-sdk-utility\gulpfile.js:3:20)
    at async Promise.all (index 0) {
  code: 'ERR_REQUIRE_ESM'
}
    • 错误 5:
 PS E:\simple-el-widget> mub Starting series of gulp tasks for the wrapping... exec error: Error: Command failed: gulp --e --wd E:\simple-el-widget [11:27:14] Local modules not found in E:\twx-wc-sdk-utility [11:27:14] Try running: npm install
这是文章 358656 的 PDF 版本,可能已过期。最新版本 CS358656