簡體   English   中英

在autodesk forge數據可視化中上傳model的問題

[英]Problems uploading a model in autodesk forge data visualization

  forge-dataviz-iot-reference-app@0.3.3 dev
    > concurrently --kill-others "npm run watch" "npm run start" "nodemon 
server/localserver.js -- 
  delay 300ms --ext js,jsx"

[2] [nodemon] 2.0.7
[2] [nodemon] to restart at any time, enter `rs`
[2] [nodemon] watching path(s): *.*
[2] [nodemon] watching extensions: js,jsx
[2] [nodemon] starting `node server/localserver.js`
[2] http://localhost:9000
[0] 
[0] > forge-dataviz-iot-reference-app@0.3.3 watch
[0] > webpack --watch --config webpack.config.js
[0]
[1]
[1] > forge-dataviz-iot-reference-app@0.3.3 start
[1] > ws -p 9081
[1]
[1] Listening on http://DESKTOP-9P38L3U:9081, http://192.168.1.100:9081, http://127.0.0.1:9081
[0] asset bundle.js 23.4 MiB [emitted] (name: main)
[0] asset main.bundle.css 59.4 KiB [emitted] (name: main)
[0] Entrypoint main 23.5 MiB = main.bundle.css 59.4 KiB bundle.js 23.4 MiB
[0] orphan modules 80.9 KiB [orphan] 106 modules
[0] runtime modules 1.25 KiB 6 modules
[0] modules by path ./node_modules/ 8.37 MiB (javascript) 58.8 KiB (css/mini-extract) 1023 
  modules
[0] modules by path ./client/ 124 KiB 14 modules
[0] modules by path ./assets/images/*.svg 28.3 KiB
[0]   ./assets/images/fan-00.svg 2.66 KiB [built] [code generated]
[0]   + 11 modules
[0] modules by path ./scss/*.scss 50 bytes (javascript) 592 bytes (css/mini-extract)
[0]   ./scss/main.scss 50 bytes [built] [code generated]
[0]   css ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js?? 
ruleSet[1].rules[2].use[2]!./scss/main.scss 592 bytes [built] [code generated]
[0] modules by path ./shared/config/*.js 1.64 KiB
[0]   ./shared/config/SiteConfig.js 1.18 KiB [built] [code generated]
[0]   ./shared/config/ApplicationContext.js 474 bytes [built] [code generated]
[0] ./util.inspect (ignored) 15 bytes [built] [code generated]
[0] webpack 5.72.0 compiled successfully in 16688 ms
[2] [nodemon] restarting due to changes...
[2] [nodemon] starting `node server/localserver.js`
[2] http://localhost:9000    

這是我得到的代碼我遵循了本教程https://forge.autodesk.com/en/docs/dataviz/v1/developers_guide/quickstart/replace_model/不起作用,因為當我 go 到 localhost:9000/upload 時,它提醒我參考應用程序的默認 model

編輯:這是我的瀏覽器控制台中的錯誤:加載資源失敗:服務器響應狀態為 500(內部服務器錯誤)上傳:1 未捕獲(承諾)語法錯誤:JSON 中的意外令牌 E,地址為 position 0 DevTools 未能加載源 map:無法加載 https 的內容://autodeskviewer.com/viewers/latest/viewer3D.js.map :加載因加載超時而取消 這是問題:審核 navigator.userAgent、navigator.appVersion 和navigator.platform Indicate whether a cookie is intended to be set in a cross-site context by specifying its SameSite attribute Indicate whether to send a cookie in a cross-site request by specifiing its SameSite attribute also this appears:

{
"developerMessage": "Token is not provided in the request.",
"moreInfo":"https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling 
   /",
 "errorCode": "AUTH-010"
}

正如我在您的其他問題中提到的,請確保按照教程中列出的步驟進行操作,特別是創建.env文件,並使用ENV=local env 運行npm run dev命令。 多變的。

此外,我一直在研究類似於https://hyperion.autodesk.io的演示應用程序,它更“精簡”,使用更少的依賴項等: https://github.com/petrbroz/forge-iot-擴展演示 隨時嘗試一下。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM