webfansplz / temir

Vue for interactive command-line apps
MIT License
1k stars 36 forks source link

can't run examples/hi-temir #3

Closed LoTwT closed 2 years ago

LoTwT commented 2 years ago

Project Info:

- Operating System:  `Windows_NT`
- Node Version:      `v16.16.0`
- Package Manager:   `pnpm@7.9.0`
- Terminal:          `PowerShell 7.2.5`

Log :


G:\codes\hi-temir via 🌰 v16.16.0
❯ pnpm dev

> hi-temir@ dev G:\codes\hi-temir
> temir src/main.ts

G:\codes\hi-temir\node_modules\.pnpm\yoga-layout-prebuilt@1.10.0\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
        throw ex;
        ^

Error: Failed to resolve import "vue" from "src\App.vue". Does the file exist?
    at formatError (G:\codes\hi-temir\node_modules\.pnpm\vite@2.9.14\node_modules\vite\dist\node\chunks\dep-c9998dc6.js:39080:46)
    at TransformContext.error (G:\codes\hi-temir\node_modules\.pnpm\vite@2.9.14\node_modules\vite\dist\node\chunks\dep-c9998dc6.js:39076:19)
    at normalizeUrl (G:\codes\hi-temir\node_modules\.pnpm\vite@2.9.14\node_modules\vite\dist\node\chunks\dep-c9998dc6.js:58354:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async TransformContext.transform (G:\codes\hi-temir\node_modules\.pnpm\vite@2.9.14\node_modules\vite\dist\node\chunks\dep-c9998dc6.js:58503:57)
    at async Object.transform (G:\codes\hi-temir\node_modules\.pnpm\vite@2.9.14\node_modules\vite\dist\node\chunks\dep-c9998dc6.js:39317:30)
    at async doTransform (G:\codes\hi-temir\node_modules\.pnpm\vite@2.9.14\node_modules\vite\dist\node\chunks\dep-c9998dc6.js:50037:29) {
  plugin: 'vite:import-analysis',
  id: 'G:/codes/hi-temir/src/App.vue',
  pluginCode: 'import { defineComponent as _defineComponent } from "vue";\n' +
    'import { ref } from "@vue/runtime-core";\n' +
    'import { TBox, TText } from "@temir/core";\n' +
    'const _sfc_main = /* @__PURE__ */ _defineComponent({\n' +
    '  __name: "App",\n' +
    '  setup(__props, { expose }) {\n' +
    '    expose();\n' +
    '    const count = ref(0);\n' +
    '    setInterval(() => {\n' +
    '      count.value++;\n' +
    '    }, 100);\n' +
    '    const __returned__ = { count, TBox, TText };\n' +
    '    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });\n' +
    '    return __returned__;\n' +
    '  }\n' +
    '});\n' +
    'import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from "vue";\n' +
    'function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n' +
    '  return _openBlock(), _createBlock($setup["TBox"], {\n' +
    '    margin: 5,\n' +
    '    width: 30,\n' +
    '    height: 5,\n' +
    '    "border-style": "double",\n' +
    '    "justify-content": "center",\n' +
    '    "align-items": "center"\n' +
    '  }, {\n' +
    '    default: _withCtx(() => [\n' +
    '      _createVNode($setup["TText"], { color: "#42b883" }, {\n' +
    '        default: _withCtx(() => [\n' +
    '          _createTextVNode(" \\u{1F308} Hi TEMIR !! " + _toDisplayString($setup.count), 1)\n' +
    '        ]),\n' +
    '        _: 1\n' +
    '      })\n' +
    '    ]),\n' +
    '    _: 1\n' +
    '  });\n' +
    '}\n' +
    '_sfc_main.__hmrId = "7ba5bd90";\n' +
    'typeof __VUE_HMR_RUNTIME__ !== "undefined" && __VUE_HMR_RUNTIME__.createRecord(_sfc_main.__hmrId, _sfc_main);\n' +
    'import.meta.hot.accept(({ default: updated, _rerender_only }) => {\n' +
    '  if (_rerender_only) {\n' +
    '    __VUE_HMR_RUNTIME__.rerender(updated.__hmrId, updated.render);\n' +
    '  } else {\n' +
    '    __VUE_HMR_RUNTIME__.reload(updated.__hmrId, updated);\n' +
    '  }\n' +
    '});\n' +
    'import _export_sfc from "plugin-vue:export-helper";\n' +
    'export default /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "G:/codes/hi-temir/src/App.vue"]]);\n',
  loc: { file: 'G:/codes/hi-temir/src/App.vue', line: 1, column: 54 },
  frame: '1  |  import { defineComponent as _defineComponent } from "vue";\n' +
    '   |                                                       ^\n' +
    '2  |  import { ref } from "@vue/runtime-core";\n' +
    '3  |  import { TBox, TText } from "@temir/core";'
}
 ELIFECYCLE  Command failed with exit code 7.
webfansplz commented 2 years ago

use yarn/npm instead of pnpm install (to avoid the PNPM workspace) for playground then run again.

LoTwT commented 2 years ago

use yarn/npm instead of pnpm install (to avoid the PNPM workspace) for playground then run again.

I made playground as an independent project and use yarn, but it still failed.

1660036386529

webfansplz commented 2 years ago

I made playground as an independent project and use yarn, but it still failed.

Can the examples/hi-temir run??

LoTwT commented 2 years ago

I made playground as an independent project and use yarn, but it still failed.

Can the examples/hi-temir run??

😭no...

1660037477179

hhy5277 commented 2 years ago

me too

webfansplz commented 2 years ago

Fixed in v0.0.7

LoTwT commented 2 years ago

Fixed in v0.0.7

Nice job! I thought that it could be hard work and my first MacBook is on the way 🤣 .

webfansplz commented 2 years ago

Fixed in v0.0.7

Nice job! I thought that it could be hard work and my first MacBook is on the way 🤣 .

Yeah,Windows is so hard 😅,Welcome to embrace MacOS.