Giter VIP home page Giter VIP logo

examples's People

Contributors

jad31 avatar milesj avatar tbezman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

examples's Issues

Failed to build browser-package while running nextjs in dev mode

After running the nextjs in dev mode, I tried updating the browser-package index.ts file where add function is present. I modified it to return a + b + 1 but seems like we have to manually build the browser-package again to see the changes

pnpm moon run nextjs-app:dev

pnpm moon run browser-package:build in separate window

Is there a way to integrate this in same dev command ?

Problems when running dev task for nestjs-app

Hello,

I have been trying unsuccessfully to reference a project containing a TypeScript library** with another project that includes services implemented with NestJS. That’s why I decided to do a test and clone the examples repo, then try to replicate the configuration and understand why I have not been able to refer successfully. I also had no success trying the explicit configuration indicated in the examples guide for NestJS.

However, when trying to run the dev task of the nestjs-app project, I get a similar error, in this case:

Error: Cannot find module '/home/dev/experimental/moonrepo/.moon/cache/types/apps/nestjs-app/main'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Function.Module._load (node:internal/modules/cjs/loader:986:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at node:internal/main/run_main_module:28:49

I understand that the configuration set for TypeScript in toolchain.yml (routeOutDirToCache: true) causes the outDir from the NestJS configuration (nest-cli.json) to be rewritten and point to Moon’s cache. However, there doesn’t seem to be any directory with the code transpiled to JavaScript.

It should be noted that the only thing I did after cloning the repo was to change the versions in .moon/toolchain.json for Node, as on my machine I have version 20.14.0 instead of version 20.13.1 and the version of PNPM has version 9.1.4 instead of 9.0.2. However, I installed versions 20.13.1 for Node and 9.0.2 for PNPM and the error persists.

The rest of the applications (Angular, Astro, NextJS, Nuxt, Remix, SvelteKit, and Vue+Vite), at least testing with the dev task work without any problem.

The versions of my toolchain:

  • Node: 20.14.0 (I also tested with 20.13.1)
  • PNPM: 9.1.4 (I also tested with 9.0.2)
  • Moon: 1.25.0

The rest of the packages and their versions are the same as the package.json of the repository. I didn't modify any definition contained in the .moon configuration (neither node-library.yml, nor node.yml in the tasks directory, nor toolchain.yml nor workspace.yml.

Is there something misconfigured in the NestJS project? Thank you!

ERROR ENOENT: no such file or directory, open /apps/web/package.json'

Packemon used with moonrepo. When I build it on package of browser_pckg, It works. But, when I ran build command via moonrepo on whole of projects it doesn't work regarding that other react projects work well but the Packemon doesn't work in the browser_pckg package.

_placement of browser_pckg is shared->front->web>pckgs->browser_pckg

I thinks something is wrong on tsconfig files for giving right address as far as address of browser_pckg path.

tsconfig.json in browser_pckg

{
    "extends": "../../../tsconfig.options.json",
    "compilerOptions": {
        "outDir": "../../../.moon/cache/types/shared/pckgs/browser_pckg",
        "verbatimModuleSyntax": false
    },
    "include": [
        "src/**/*",
        "tests/**/*"
    ],
    "references": [
        {
            "path": "./tsconfig.esm.json"
        },
        {
            "path": "./tsconfig.lib.json"
        }
    ]
}

tsconfig.lib.json in browser_pckg

{
  "extends": "../../../tsconfig.options.json",
  "compilerOptions": {
    "outDir": "lib",
    "rootDir": "src"
  },
  "include": [
    "src/**/*"
  ],
  "references": []
}

tsconfig.options.json of main project

// https://www.npmjs.com/package/tsconfig-moon
{
  "extends": "tsconfig-moon/tsconfig.json",
  "compilerOptions": {
    "allowJs": true,
    "lib": ["esnext", "dom"],
    "moduleResolution": "nodenext",
    "target": "es2022",
    "composite": true,
    "declaration": true,
    "declarationMap": true,
    "emitDeclarationOnly": true,
    "incremental": true,
    "noEmit": false,
    "noEmitOnError": true,
    "skipLibCheck": true,
    "verbatimModuleSyntax": false
  }
}
> packemon build --addEngines

@monorepo/browserpckg**
  ◼ lib (206 B) ◼ esm (188 B) 595ms
u2204oneuser@u2204onehost:/mnt/workspa
pnpm run build

▪▪▪▪ browser_pckg:build
packemon pack --addEngines --addExports (in ./shared/pckgs/browser_pckg)
  browser_pckg:build | @monorepo/browserpckg**
  browser_pckg:build |   ◼ lib (206 B) ◼ esm (188 B) 564ms
  browser_pckg:build | 
  browser_pckg:build |  ERROR 
  browser_pckg:build | 
  browser_pckg:build |  ENOENT: no such file or directory, open
  browser_pckg:build |  '/mnt/workspace1/dir_git/dir_my_repo/nft-music/apps/web/package.json'
  browser_pckg:build | 
  browser_pckg:build |  STACK TRACE 
  browser_pckg:build | 
  browser_pckg:build |     at Object.openSync (node:fs:601:3)
  browser_pckg:build |     at Object.readFileSync (node:fs:469:35)
  browser_pckg:build |     at Object.load (/mnt/workspace1/dir_git/dir_my_repo/nft-music/node_modules/.
  browser_pckg:build | pnpm/@[email protected][email protected]/node_modules/@boost/common/cjs/seriali
  browser_pckg:build | zers/json.cjs:20:36)
  browser_pckg:build |     at /mnt/workspace1/dir_git/dir_my_repo/nft-music/node_modules/.pnpm/@boost+c
  browser_pckg:build | [email protected][email protected]/node_modules/@boost/common/cjs/Project.cjs:118:23
  browser_pckg:build |     at Array.map (<anonymous>)
  browser_pckg:build |     at Project.getWorkspacePackages 
  browser_pckg:build | (/mnt/workspace1/dir_git/dir_my_repo/nft-music/node_modules/.pnpm/@boost+common@
  browser_pckg:build | [email protected]/node_modules/@boost/common/cjs/Project.cjs:114:8)
  browser_pckg:build |     at Project.memoizer 
  browser_pckg:build | (/mnt/workspace1/dir_git/dir_my_repo/nft-music/node_modules/.pnpm/@boost+decorat
  browser_pckg:build | [email protected]/node_modules/@boost/decorators/cjs/Memoize.cjs:39:26)
  browser_pckg:build |     at PackageValidator.getWorkspacePackageNames 
  browser_pckg:build | (/mnt/workspace1/dir_git/dir_my_repo/nft-music/node_modules/.pnpm/[email protected]
  browser_pckg:build | [email protected]/node_modules/packemon/cjs/PackageValidator.cjs:319:59)
  browser_pckg:build |     at PackageValidator.checkDependencies 
  browser_pckg:build | (/mnt/workspace1/dir_git/dir_my_repo/nft-music/node_modules/.pnpm/[email protected]
  browser_pckg:build | [email protected]/node_modules/packemon/cjs/PackageValidator.cjs:62:48)
  browser_pckg:build |     at PackageValidator.validate 
  browser_pckg:build | (/mnt/workspace1/dir_git/dir_my_repo/nft-music/node_modules/.pnpm/[email protected]
  browser_pckg:build | [email protected]/node_modules/packemon/cjs/PackageValidator.cjs:36:12)
  browser_pckg:build |     at Packemon.validate 
  browser_pckg:build | (/mnt/workspace1/dir_git/dir_my_repo/nft-music/node_modules/.pnpm/[email protected]
  browser_pckg:build | [email protected]/node_modules/packemon/cjs/Packemon.cjs:44:55)
  browser_pckg:build |     at PackCommand.pack 
  browser_pckg:build | (/mnt/workspace1/dir_git/dir_my_repo/nft-music/node_modules/.pnpm/[email protected]
  browser_pckg:build | [email protected]/node_modules/packemon/cjs/commands/Build.cjs:74:43)
  browser_pckg:build |     at async PackCommand.run 
  browser_pckg:build | (/mnt/workspace1/dir_git/dir_my_repo/nft-music/node_modules/.pnpm/[email protected]
  browser_pckg:build | [email protected]/node_modules/packemon/cjs/commands/Pack.cjs:11:5)
  browser_pckg:build |     at async Program.runAndRender (/mnt/workspace1/dir_git/dir_my_repo/nft-music
  browser_pckg:build | /node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/nod
  browser_pckg:build | e_modules/@boost/cli/cjs/Program.cjs:474:24)
  browser_pckg:build |     at async Program.run (/mnt/workspace1/dir_git/dir_my_repo/nft-music/node_mod
  browser_pckg:build | ules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules
  browser_pckg:build | /@boost/cli/cjs/Program.cjs:298:18)
  browser_pckg:build |     at async Program.runAndExit (/mnt/workspace1/dir_git/dir_my_repo/nft-music/n
  browser_pckg:build | ode_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_
  browser_pckg:build | modules/@boost/cli/cjs/Program.cjs:317:22)
  browser_pckg:build |     at async run (/mnt/workspace1/dir_git/dir_my_repo/nft-music/node_modules/.pn
  browser_pckg:build | pm/[email protected][email protected]/node_modules/packemon/cjs/bin.cjs:44:3)
  browser_pckg:build | 

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.