Giter Site home page Giter Site logo

BaklavaJS 1.5.2 Build Error about baklavajs HOT 8 CLOSED

newcat avatar newcat commented on May 21, 2024
BaklavaJS 1.5.2 Build Error

from baklavajs.

Comments (8)

newcat avatar newcat commented on May 21, 2024

Yup, forgot to add @baklavajs/events to the dependencies. Should work now in v1.5.3

from baklavajs.

carbotaniuman avatar carbotaniuman commented on May 21, 2024

It looks like you also forgot vue-property-decorator and vue-class-component in your dependency blocks.

from baklavajs.

newcat avatar newcat commented on May 21, 2024

They shouldn't be needed as they will be included in the webpack-compiled build artifact. Also I can't reproduce this problem in my test projects. Can you post the error log, please?

from baklavajs.

carbotaniuman avatar carbotaniuman commented on May 21, 2024
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-options-vue/dist/baklavajs-plugin-options-vue/src/BaseNumericOption.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | import { INodeOption } from "../../baklavajs-core/types";
    3 | export declare class BaseNumericOption extends Vue {
    4 |     MAX_STRING_LENGTH: number;
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-options-vue/dist/baklavajs-plugin-options-vue/src/ButtonOption.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | export default class ButtonOption extends Vue {
    3 |     name: string;
    4 | }
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-options-vue/dist/baklavajs-plugin-options-vue/src/CheckboxOption.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | export default class InputOption extends Vue {
    3 |     value: boolean;
    4 |     name: string;
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-options-vue/dist/baklavajs-plugin-options-vue/src/InputOption.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | export default class InputOption extends Vue {
    3 |     value: string;
    4 |     name: string;
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-options-vue/dist/baklavajs-plugin-options-vue/src/SelectOption.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | import { INodeOption } from "../../baklavajs-core/types";
    3 | export default class SelectOption extends Vue {
    4 |     open: boolean;
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-options-vue/dist/baklavajs-plugin-options-vue/src/TextOption.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | export default class TextOption extends Vue {
    3 |     get sanitized(): string;
    4 |     value: string;
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-renderer-vue/dist/baklavajs-plugin-renderer-vue/src/components/connection/ConnectionView.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | import { TemporaryConnectionState, ITransferConnection, ITemporaryConnection } from "../../../../baklavajs-core/types";
    3 | import { ViewPlugin } from "../../viewPlugin";
    4 | export default class Connection extends Vue {
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-renderer-vue/dist/baklavajs-plugin-renderer-vue/src/components/connection/ConnectionWrapper.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | import { ITransferConnection, TemporaryConnectionState } from "../../../../baklavajs-core/types";
    3 | export default class ConnectionWrapper extends Vue {
    4 |     connection: ITransferConnection;
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-renderer-vue/dist/baklavajs-plugin-renderer-vue/src/components/connection/TemporaryConnection.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | import { ITemporaryConnection, TemporaryConnectionState, INodeInterface } from "../../../../baklavajs-core/types";
    3 | export default class TemporaryConnection extends Vue {
    4 |     connection: ITemporaryConnection;
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-renderer-vue/dist/baklavajs-plugin-renderer-vue/src/components/ContextMenu.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | export interface IMenuItem {
    3 |     label?: string;
    4 |     value?: any;
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-renderer-vue/dist/baklavajs-plugin-renderer-vue/src/components/Editor.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | import { INode, INodeInterface, ITemporaryConnection } from "../../../baklavajs-core/types";
    3 | import { ViewPlugin } from "../viewPlugin";
    4 | import { IViewNode } from "../../types";
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-renderer-vue/dist/baklavajs-plugin-renderer-vue/src/components/node/Node.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | import { ViewPlugin } from "../../viewPlugin";
    3 | import { IViewNode } from "../../../types";
    4 | export default class NodeView extends Vue {
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-renderer-vue/dist/baklavajs-plugin-renderer-vue/src/components/node/NodeInterface.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | import { VueConstructor } from "vue";
    3 | import EditorView from "../Editor.vue";
    4 | import { INodeInterface } from "../../../../baklavajs-core/types";
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-renderer-vue/dist/baklavajs-plugin-renderer-vue/src/components/node/NodeOption.vue.d.ts(2,21):
2:21 Cannot find module 'vue-property-decorator'.
    1 | import { VueConstructor } from "vue";
  > 2 | import { Vue } from "vue-property-decorator";
      |                     ^
    3 | import { INodeOption, INode } from "../../../../baklavajs-core/types";
    4 | import { ViewPlugin } from "../../viewPlugin";
    5 | export default class NodeOptionView extends Vue {
ERROR in C:/Users/quydx/WebstormProjects/frontend - Copy/node_modules/@baklavajs/plugin-renderer-vue/dist/baklavajs-plugin-renderer-vue/src/components/Sidebar.vue.d.ts(1,21):
1:21 Cannot find module 'vue-property-decorator'.
  > 1 | import { Vue } from "vue-property-decorator";
      |                     ^
    2 | import { ViewPlugin } from "../viewPlugin";
    3 | export default class Sidebar extends Vue {
    4 |     width: number;

If I set "noEmitOnError": false, in my tsconfig.json, everything still appears to work correctly.

from baklavajs.

newcat avatar newcat commented on May 21, 2024

Ok yeah this happens when you use the option plugin (and probably also the renderer plugin) in TypeScript projects that don't use the vue-property-decorator package. Currently, the package is already bundled during the Webpack build, so the functionality is in there, but TypeScript doesn't include the necessary typings in the declaration files. I'll see what I can do to fix this. I don't want to include vue-property-decorator as a dependency because for the functionality it isn't needed. But I plan to change the whole build process anyway and remove webpack, so then vue-property-decorator would actually be a dependency. But this will take some time.

For now, as a workaround, just add vue-property-decorator to your project manually npm install vue-property-decorator

from baklavajs.

carbotaniuman avatar carbotaniuman commented on May 21, 2024

Got it. I'm putting this here because I think it's related to the Webpack build changes. Before 1.5.x, I could do import { INodeOption } from '@baklavajs/core/dist/types'; to import INodeOption, but now I must do import { INodeOption } from "@baklavajs/core/dist/baklavajs-core/types";, and ESLint complains about an unresolvable import. It still compiles of course, but it is arguably less ergonomic than the previous behavior.

from baklavajs.

newcat avatar newcat commented on May 21, 2024

True. This happened because I put all the events stuff in a separate package. But as you already wrote, this should change with the build process update. Thanks for mentioning it, I will try to make it more ergonomic when I rewrite the build stuff.

from baklavajs.

newcat avatar newcat commented on May 21, 2024

The build system has completely changed in V2, so these issues shouldn't exist there anymore

from baklavajs.

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.