[email protected] 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] > [email protected] watch
[0] > webpack --watch --config webpack.config.js
[0]
[1]
[1] > [email protected] 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
这是我得到的代码我遵循本教程
我正在尝试将自己的模式上传到Autodesk Forge中,但是它不起作用,因为当我转到Localhost:9000/上传时,它使我想起了参考应用程序编辑的默认模型
:这是我浏览器控制台中的错误:
无法加载资源:服务器以500的状态响应(内部服务器错误)
上载:1个未被告人(在承诺中)SyntaxError:位置0的JSON中的意外令牌E
DevTools无法加载源地图:无法为:由于加载超时而取消了加载
这是问题:
Navigator.useragent,Navigator.Appversion和Navigator.platform的审核用法
指示是否要通过指定其samesite属性在跨站点上下文中设置cookie
指示是否通过指定其samesite属性来发送cookie
还出现了:
{
"developerMessage": "Token is not provided in the request.",
"moreInfo":"https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling
/",
"errorCode": "AUTH-010"
}
[email protected] 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] > [email protected] watch
[0] > webpack --watch --config webpack.config.js
[0]
[1]
[1] > [email protected] 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
this is the code i'm getting i followed this tutorial https://forge.autodesk.com/en/docs/dataviz/v1/developers_guide/quickstart/replace_model/
I'm trying to upload my own mode in autodesk forge but it doesn't work because when i go to localhost:9000/upload it reminds me to the default model of the reference app
EDIT: this are the errors in my browser console:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
upload:1 Uncaught (in promise) SyntaxError: Unexpected token E in JSON at position 0
DevTools failed to load source map: Could not load content for https://autodeskviewer.com/viewers/latest/viewer3D.js.map: Load canceled due to load timeout
this are the issues:
Audit usage of navigator.userAgent, navigator.appVersion, and 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 specifying 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"
}
发布评论
评论(1)
正如我在您的另一个问题中提到的那样,请确保遵循教程中列出的步骤,特别是创建 env 文件,并运行使用
npm run dev
命令env = local
env。多变的。另外,我一直在开发类似于 https://github.com/ PETRBROZ/FORGE-IOT-EXTENTIONS-DEMO 。随时尝试一下。
As I mentioned in your other question, make sure to follow the steps listed in the tutorial, specifically the creation of the .env file, and running the
npm run dev
command with theENV=local
env. variable.Also, I've been working on a demo application similar to https://hyperion.autodesk.io that is much "leaner", using fewer dependencies, etc.: https://github.com/petrbroz/forge-iot-extensions-demo. Feel free to give it a try.