XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. jmrapin
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 2
    • Groups 0

    jmrapin

    @jmrapin

    0
    Reputation
    1
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    jmrapin Unfollow Follow

    Latest posts made by jmrapin

    • RE: SyntaxError: Cannot use import statement outside a module

      @julien-f well spotted. Thanks!
      All good now.

      posted in Xen Orchestra
      J
      jmrapin
    • RE: SyntaxError: Cannot use import statement outside a module

      @aqua-calc, I have the same issue....
      building at commit level a204b6fb3f1236dc5f4519a734c4d5c8f99f9e9c
      and I am getting the same error. Cleaned all a did a fresh git pull --ff-only

      yarn run v1.22.5
      $ node dist/cli.mjs
      (node:3448) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
      (Use node --trace-warnings ... to show where the warning was created)
      /root/xen-orchestra/packages/xo-server/dist/xapi/mixins/index.js:2
      import _gpu, * as __gpu from "./gpu";
      ^^^^^^

      SyntaxError: Cannot use import statement outside a module
      etc...

      The yarn build command produces those files (there is something wrong somewhere, why does the build produces index.js when there is the index.mjs?)

      So

      1. delete /packages/xo-server/dist/xapi/mixins/index.js (rm index.js)
      2. delete /packages/xo-server/dist/xapi/mixins/index.js.map (rm index.js.map)
      3. remove the import and export statements referencing index.js from file /packages/xo-server/dist/xapi/mixins/index.mjs (nano index.mjs)

      and did the same as above for /packages/xo-server/dist/api/index.js
      and same for /packages/xo-server/dist/xo-mixins/index.js

      And then yarn start and it starts and orchestra is fine as far as I can see.

      Not sure if that's the best but it got me going . Hope this helps someone.

      posted in Xen Orchestra
      J
      jmrapin