jellyzone
jellyzone
WWasp-lang
Created by jellyzone on 5/13/2024 in #đŸ™‹questions
I want to show a react gpu component using Use.GPU
Ok, thank you , I'll post a question and see how things goes!
11 replies
WWasp-lang
Created by jellyzone on 5/13/2024 in #đŸ™‹questions
I want to show a react gpu component using Use.GPU
No, I haven't modify the package.json by hand, I just install the use-gpu by npm install. the content of package.json is like: { "name": "tailwindtest", "dependencies": { "@nextui-org/react": "^2.3.6", "@use-gpu/inspect": "^0.11.0", "@use-gpu/inspect-gpu": "^0.11.0", "@use-gpu/layout": "^0.11.0", "@use-gpu/live": "^0.11.0", "@use-gpu/parse": "^0.11.0", "@use-gpu/plot": "^0.11.0", "@use-gpu/react": "^0.11.0", "@use-gpu/scene": "^0.11.0", "@use-gpu/traits": "^0.11.0", "@use-gpu/webgpu": "^0.11.0", "@use-gpu/wgsl-loader": "^0.11.0", "@use-gpu/workbench": "^0.11.0", "@webgpu/types": "^0.1.40", "clsx": "^2.1.1", "react": "^18.2.0", "tailwind-merge": "^2.3.0", "wasp": "file:.wasp/out/sdk/wasp" }, "devDependencies": { "@types/react": "^18.0.37", "prisma": "4.16.2", "typescript": "^5.1.0", "vite": "^4.3.9" } }
11 replies
WWasp-lang
Created by jellyzone on 5/13/2024 in #đŸ™‹questions
I want to show a react gpu component using Use.GPU
sorry, I'm a c++ programmer, just do not familiar with all these library! I change the content of vite.config.ts to: import { defineConfig } from 'vite' import rollupWGSL from '@use-gpu/wgsl-loader/rollup'; export default defineConfig({ server: { open: true, }, plugins: [ rollupWGSL() ] }) when execute wasp start, the log says:
[ Server ] > rollup --config --silent
[ Server ]
[ Client!] (node:18827) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
[ Client!] (Use `node --trace-warnings ...` to show where the warning was created)
[ Client!] failed to load config from /home/zhufei/git/tailwindtest/.wasp/out/web-app/vite.config.ts
[ Client!] error when starting dev server:
[ Client!] /home/zhufei/git/tailwindtest/node_modules/@use-gpu/wgsl-loader/mjs/rollup.js:1
[ Client!] import { createFilter } from 'rollup-pluginutils';
[ Client!] ^^^^^^
[ Client!]
[ Client!] SyntaxError: Cannot use import statement outside a module
[ Client!] at internalCompileFunction (node:internal/vm:128:18)
[ Client!] at wrapSafe (node:internal/modules/cjs/loader:1280:20)
[ Client!] at Module._compile (node:internal/modules/cjs/loader:1332:27)
[ Client!] at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
[ Client!] at Module.load (node:internal/modules/cjs/loader:1206:32)
[ Client!] at Module._load (node:internal/modules/cjs/loader:1022:12)
[ Client!] at cjsLoader (node:internal/modules/esm/translators:366:17)
[ Client!] at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:315:7)
[ Client!] at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
[ Client!] at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
[ Server ] > rollup --config --silent
[ Server ]
[ Client!] (node:18827) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
[ Client!] (Use `node --trace-warnings ...` to show where the warning was created)
[ Client!] failed to load config from /home/zhufei/git/tailwindtest/.wasp/out/web-app/vite.config.ts
[ Client!] error when starting dev server:
[ Client!] /home/zhufei/git/tailwindtest/node_modules/@use-gpu/wgsl-loader/mjs/rollup.js:1
[ Client!] import { createFilter } from 'rollup-pluginutils';
[ Client!] ^^^^^^
[ Client!]
[ Client!] SyntaxError: Cannot use import statement outside a module
[ Client!] at internalCompileFunction (node:internal/vm:128:18)
[ Client!] at wrapSafe (node:internal/modules/cjs/loader:1280:20)
[ Client!] at Module._compile (node:internal/modules/cjs/loader:1332:27)
[ Client!] at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
[ Client!] at Module.load (node:internal/modules/cjs/loader:1206:32)
[ Client!] at Module._load (node:internal/modules/cjs/loader:1022:12)
[ Client!] at cjsLoader (node:internal/modules/esm/translators:366:17)
[ Client!] at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:315:7)
[ Client!] at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
[ Client!] at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
Why!
11 replies