-
Notifications
You must be signed in to change notification settings - Fork 12k
express-engine: the request of a dependency is an expression #17604
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
Comments
The problem is caused by dd-trace because they have the below in their code function getVersion (moduleBaseDir) {
if (moduleBaseDir) {
const packageJSON = `${moduleBaseDir}/package.json`
return require(packageJSON).version
}
} Webpack is also warning about this
There are possible solutions;
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist/ngu-repro-spdx/server",
"main": "server.ts",
"tsConfig": "tsconfig.server.json",
"externalDependencies":["dd-trace"]
},
new webpack.ContextReplacementPlugin(/dd-trace(\\|\/)/), See https://webpack.js.org/plugins/context-replacement-plugin/ for more info about this plugin. |
The first option works perfectly. Thx Alan! |
The error here:
is caused by the fact that the |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Uh oh!
There was an error while loading. Please reload this page.
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Bugs in Ng Universal v8 forbid to reproduce this issue.
Tested with several v9 versions, bug stays the same.
Description
With
@nguniversal/express-engine
, when using a third-party package server-side, runningng run <project>:server:production
orng run <project>:serve-ssr
fails.🔬 Minimal Reproduction
https://github.com/noelmace/ngu-repro-spdx
ng new reproduce
ng add @nguniversal/express-engine
npm i -d dd-trace graphql
src/tracer.ts
:src/tracer.ts
inserver.ts
npm run build:ssr
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
Pacote was added by @clydin via #13483 at https://github.com/angular/angular-cli/blame/9.1.x/packages/angular/cli/utilities/package-metadata.ts#L15 and downgraded in v10 by @alan-agius4 via #17358.
The text was updated successfully, but these errors were encountered: