Git Product home page Git Product logo

Comments (16)

jia000 avatar jia000 commented on May 11, 2024

在vue.config.js里加上transpileDependencies: [/@tmagic/]试试看

from tmagic-editor.

Freedomhxb avatar Freedomhxb commented on May 11, 2024

在vue.config.js里加上transpileDependencies: [/@tmagic/]试试看

不行。变成其他的报错了

from tmagic-editor.

jia000 avatar jia000 commented on May 11, 2024

错误信息发出来看看

from tmagic-editor.

Jack-Xiexx avatar Jack-Xiexx commented on May 11, 2024

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.

jia000 avatar jia000 commented on May 11, 2024

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.

qdu123 avatar qdu123 commented on May 11, 2024

我的报
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.

SJLgogo avatar SJLgogo commented on May 11, 2024

在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.

jia000 avatar jia000 commented on May 11, 2024

我的报 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.

jia000 avatar jia000 commented on May 11, 2024

@SJLgogo 不是ts项目?

from tmagic-editor.

qdu123 avatar qdu123 commented on May 11, 2024

我的报 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.

jia000 avatar jia000 commented on May 11, 2024

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.

jia000 avatar jia000 commented on May 11, 2024

1.0.0-beta.14 已发布

from tmagic-editor.

SJLgogo avatar SJLgogo commented on May 11, 2024

from tmagic-editor.

lxt-ing avatar lxt-ing commented on May 11, 2024

请问一下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.

ashen9 avatar ashen9 commented on May 11, 2024

为啥我用的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.

JustGogoing avatar JustGogoing commented on May 11, 2024
"@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.