Comments (16)
在vue.config.js里加上transpileDependencies: [/@tmagic/]试试看
from tmagic-editor.
在vue.config.js里加上transpileDependencies: [/@tmagic/]试试看
不行。变成其他的报错了
from tmagic-editor.
错误信息发出来看看
from tmagic-editor.
ERROR in ./node_modules/@tmagic/schema/src/index.ts 19:7
Module parse failed: Unexpected token (19:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| */
|
export enum NodeType {
| CONTAINER = 'container',
| PAGE = 'page',
@ ./node_modules/@tmagic/editor/dist/tmagic-editor.es.js
@ ./src/main.js
我也遇到类似的错误,该如何处理
from tmagic-editor.
ERROR in ./node_modules/@tmagic/schema/src/index.ts 19:7
Module parse failed: Unexpected token (19:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| */
|
export enum NodeType {
| CONTAINER = 'container',
| PAGE = 'page',
@ ./node_modules/@tmagic/editor/dist/tmagic-editor.es.js
@ ./src/main.js我也遇到类似的错误,该如何处理
这个错误就是要加上配置 transpileDependencies: [/@tmagic/]
from tmagic-editor.
我的报
Uncaught TypeError: Cannot read properties of undefined (reading 'from')
at node_modules/safe-buffer/index.js (index.js:11:12)
at __require2 (chunk-TMRFOBSY.js?v=32337c56:47:50)
at node_modules/randombytes/browser.js (browser.js:15:14)
at __require2 (chunk-TMRFOBSY.js?v=32337c56:47:50)
at node_modules/serialize-javascript/index.js (index.js:9:19)
at __require2 (chunk-TMRFOBSY.js?v=32337c56:47:50)
at events.js:497:1
from tmagic-editor.
在vue.config.js里加上transpileDependencies: [/@tmagic/]试试看
修改之后还是报错
ERROR in ./node_modules/@tmagic/schema/src/index.ts 19:7
Module parse failed: Unexpected token (19:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| */
|
export enum NodeType {
| CONTAINER = 'container',
| PAGE = 'page',
from tmagic-editor.
我的报 Uncaught TypeError: Cannot read properties of undefined (reading 'from') at node_modules/safe-buffer/index.js (index.js:11:12) at __require2 (chunk-TMRFOBSY.js?v=32337c56:47:50) at node_modules/randombytes/browser.js (browser.js:15:14) at __require2 (chunk-TMRFOBSY.js?v=32337c56:47:50) at node_modules/serialize-javascript/index.js (index.js:9:19) at __require2 (chunk-TMRFOBSY.js?v=32337c56:47:50) at events.js:497:1
npm i buffer 应该就可以了,这问题已经解决过了,只是npm包还没发布新的
from tmagic-editor.
@SJLgogo 不是ts项目?
from tmagic-editor.
我的报 Uncaught TypeError: Cannot read properties of undefined (reading 'from') at node_modules/safe-buffer/index.js (index.js:11:12) at __require2 (chunk-TMRFOBSY.js?v=32337c56:47:50) at node_modules/randombytes/browser.js (browser.js:15:14) at __require2 (chunk-TMRFOBSY.js?v=32337c56:47:50) at node_modules/serialize-javascript/index.js (index.js:9:19) at __require2 (chunk-TMRFOBSY.js?v=32337c56:47:50) at events.js:497:1
npm i buffer 应该就可以了,这问题已经解决过了,只是npm包还没发布新的
感谢感谢!上一个错误解决了,
不过现在出现下面错误
Uncaught ReferenceError: global is not defined
at node_modules/randombytes/browser.js (browser.js:16:14)
at __require2 (chunk-LTPURSQW.js?v=9febb0af:18:50)
at node_modules/serialize-javascript/index.js (index.js:9:19)
at __require2 (chunk-LTPURSQW.js?v=9febb0af:18:50)
at events.js:497:1
哪位大佬给个能跑起来的工程,谢谢!
from tmagic-editor.
global is not defined
这个问题在已经修复,等1.0.0-beta.14的包
现在可以通过创建polyfills.ts文件
if (typeof (window as any).global === 'undefined') {
(window as any).global = window;
}
以上代码放入polyfills.ts中
然后再项目最开头的位置import "polyfills"
from tmagic-editor.
1.0.0-beta.14 已发布
from tmagic-editor.
from tmagic-editor.
请问一下react+webpack项目遇到这个You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. 要怎么处理呢
from tmagic-editor.
为啥我用的1.2.0版本还是有这个问题
Uncaught ReferenceError: global is not defined
at node_modules/.pnpm/[email protected]/node_modules/randombytes/browser.js (browser.js:16:14)
at __require (chunk-FQZ6OWVD.js?v=86dc4da2:11:50)
at node_modules/.pnpm/[email protected]/node_modules/serialize-javascript/index.js (index.js:9:19)
at __require (chunk-FQZ6OWVD.js?v=86dc4da2:11:50)
at events.js:497:1
from tmagic-editor.
"@tmagic/design": "^1.2.15",
"@tmagic/editor": "^1.2.15",
"@tmagic/element-plus-adapter": "^1.2.15",
"@tmagic/form": "^1.2.15",
"@tmagic/stage": "^1.2.15",
"element-plus": "^2.3.8",
"pinia": "^2.1.4",
"vue": "^3.3.4",
"vue-router": "^4.2.4"
问题依然存在,使用polyfills解决
from tmagic-editor.
Related Issues (20)
- 页面引用数据源中的内容后,切换布局后就渲染失败了
- 关于Page容器等属性固定的问题 HOT 3
- 联动组件的无法选择到对应的组件 HOT 3
- 关于Page容器布局问题 HOT 3
- 是否有计划 组件显示/隐藏功能 HOT 3
- Error: Secure random number generation is not supported by this browser. HOT 5
- 编辑器、渲染器、属性面板 三者之间数据如何相互通信?
- Bug:【已选组件】拖拽到渲染器报错
- runtime 组件目录替换为npm包名报错 HOT 1
- 【BUG】设置禁用拖拽效果,键盘事件仍生效 HOT 1
- [Bug] 使用TDesign作为UI组件的情况下,TMagicForm不能重置
- 【BUG】组件隐藏时提示不存在元素 HOT 1
- 【BUG】组件拖拽至渲染区域报错
- [bug] '"@editor/type"' has no exported member 'CodeSelectColConfig'`
- 开发并注册新的表单组件 HOT 1
- 如何回显代码编辑里的代码块 HOT 1
- acro design vue 社区有没有人做这个ui 的 适配包
- 【BUG】配置了draggable属性,组合的情况下仍可拖动
- 数据源没有自动提示 HOT 3
- 数据源有办法设置成页面级的吗 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmagic-editor.