Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets are not copied when running @nrwl/node:node with buildTarget @nrwl/js:tsc #9253

Closed
boy51 opened this issue Mar 9, 2022 · 4 comments · Fixed by #9254
Closed

Assets are not copied when running @nrwl/node:node with buildTarget @nrwl/js:tsc #9253

boy51 opened this issue Mar 9, 2022 · 4 comments · Fixed by #9254

Comments

@boy51
Copy link

boy51 commented Mar 9, 2022

Current Behavior

  • have executor set up for build and serve:
 "build": {
      "executor": "@nrwl/js:tsc",
      "outputs": ["{options.outputPath}"],
      "options": {
        "outputPath": "dist/apps/derp",
        "main": "apps/derp/src/main.ts",
        "tsConfig": "apps/derp/tsconfig.app.json",
        "assets": ["apps/derp/src/assets/**"],
        "watch": false
      },
    },
"serve": {
      "executor": "@nrwl/node:node",
      "options": {
        "buildTarget": "derp:build"
      }
    },
  • when running build, assets are copied as expected
  • when running serve with buildTarget build, assets are not copied

Expected Behavior

  • assets should get copied when running serve as they would when running build
  • this is how it works for i.e. @nrwl/node:webpack

Steps to Reproduce

Failure Logs

Environment

 >  NX   Report complete - copy this into the issue template

   Node : 16.14.0
   OS   : win32 x64
   npm  : 8.4.0

   nx : 13.8.5
   @nrwl/angular : undefined
   @nrwl/cli : 13.8.5
   @nrwl/cypress : undefined
   @nrwl/detox : undefined
   @nrwl/devkit : 13.8.5
   @nrwl/eslint-plugin-nx : 13.8.5
   @nrwl/express : undefined
   @nrwl/jest : 13.8.5
   @nrwl/js : 13.8.5
   @nrwl/linter : 13.8.5
   @nrwl/nest : 13.8.5
   @nrwl/next : undefined
   @nrwl/node : 13.8.5
   @nrwl/nx-cloud : undefined
   @nrwl/react : undefined
   @nrwl/react-native : undefined
   @nrwl/schematics : undefined
   @nrwl/storybook : undefined
   @nrwl/tao : 13.8.5
   @nrwl/web : undefined
   @nrwl/workspace : 13.8.5
   typescript : 4.5.5
   rxjs : 7.5.5
   ---------------------------------------
   Community plugins:

(node:13068) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at D:\Repos\meetergo\meetergo-monorepo\repro-tsc-build\node_modules\tslib\package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
@boy51 boy51 added the type: bug label Mar 9, 2022
nartc pushed a commit that referenced this issue Mar 9, 2022
… watch mode (#9254)

Execute the postCompilationCallback regardless of the watch option value

ISSUES CLOSED: #9253

Co-authored-by: Hannes Schmid <hannes.schmid@solunio.com>
@nemonemi
Copy link

How was it solved?
I am experiencing this as well. Please reopen.

 Node : 16.14.0
   OS   : win32 x64
   yarn : 3.0.2

   nx : 13.9.2
   @nrwl/angular : undefined
   @nrwl/cypress : 13.9.2
   @nrwl/detox : undefined
   @nrwl/devkit : 13.9.2
   @nrwl/eslint-plugin-nx : 13.9.2
   @nrwl/express : undefined
   @nrwl/jest : 13.9.2
   @nrwl/js : 13.9.2
   @nrwl/linter : 13.9.2
   @nrwl/nest : undefined
   @nrwl/next : undefined
   @nrwl/node : undefined
   @nrwl/nx-cloud : undefined
   @nrwl/nx-plugin : undefined
   @nrwl/react : 13.9.2
   @nrwl/react-native : undefined
   @nrwl/schematics : 8.12.11
   @nrwl/storybook : 13.9.2
   @nrwl/web : 13.9.2
   @nrwl/workspace : 13.9.2
   typescript : 4.3.5
   rxjs : 6.6.7

@nartc
Copy link
Contributor

nartc commented Mar 21, 2022

@nemonemi Hi, sorry to hear that. I cannot reproduce just now on the latest version of Nx. Can you open a new issue with reproduce steps? Thank you

@nemonemi
Copy link

Me neither. I'm working on creating a reproduction, but I'm not yet understanding why it is happening.

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants