rylanbot / threejs-tetris-react Goto Github PK
View Code? Open in Web Editor NEW3D 俄罗斯方块 | a 3D tetris game, developed by Three.js + React
Home Page: https://project.threejs-tetris-react.rylan.cn
3D 俄罗斯方块 | a 3D tetris game, developed by Three.js + React
Home Page: https://project.threejs-tetris-react.rylan.cn
执行npm run dev指令后,在浏览器打开报错!求解是什么原因? node版本:v21.0.0
尝试执行过 npm install --save-dev sass 指定、删除node_modules文件夹,仍然没有成功!
错误信息如下:
Preprocessor dependency "sass" failed to load:
Cannot read properties of undefined (reading 'indexOf')
17:42:30 [vite] Internal server error: Preprocessor dependency "sass" failed to load:
Cannot read properties of undefined (reading 'pop')
Plugin: vite:css
File: /Users/UserName/Downloads/threejs-tetris-react-main/src/assets/scss/global.scss
at Object. (/Users/UserName/Downloads/threejs-tetris-react-main/node_modules/sass/sass.node.js:2:43)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1201:32)
at Module._load (node:internal/modules/cjs/loader:1017:12)
at Module.require (node:internal/modules/cjs/loader:1229:19)
at require (node:internal/modules/helpers:177:18)
at loadPreprocessor (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:39264:45)
at scss (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:39310:20)
at compileCSSPreprocessors (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38735:36)
at compileCSS (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38785:42)
at async TransformContext.transform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38266:56)
at async Object.transform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:44283:30)
at async loadAndTransform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:54950:29)
at async viteTransformMiddleware (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:64345:32)
at loadPreprocessor (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:39272:29)
at scss (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:39310:20)
at compileCSSPreprocessors (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38735:36)
at compileCSS (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38785:42)
at async TransformContext.transform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38266:56)
at async Object.transform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:44283:30)
at async loadAndTransform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:54950:29)
at async viteTransformMiddleware (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:64345:32)
plz keep learning and working 😊
hello there, @RylanBot
I wish you the best of luck.
Your project is fantastic.
I do not want the user to be able to move the game board to another location on the screen, and user can do this by pressing ctrl + drag/drop
or right-click + move
.
I want to disable the ability for the user to change the position of the board.
how can i fix this ?
i use nodejs14.16.0 can install but when i run npm run dev it has error
i found same solution type it is wrang about import @react-three/fiber
i had run npm install three @types/three @react-three/fiber then it ok!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.