Conversation
✅ Deploy Preview for plugin-angular-universal-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…on in .netlify/plugins
…ible server.ts error
pieh
commented
Nov 21, 2024
src/helpers/getPackageVersion.js
Outdated
Comment on lines
+34
to
+35
| const siteRequire = createRequire(root) | ||
| packagePath = siteRequire.resolve('@netlify/angular-runtime/package.json') |
Contributor
Author
There was a problem hiding this comment.
In practice this was finding the @netlify/angular-runtime installed in <project-dir>/.netlify/plugins/node_modules despite paths being just ['<project-dir'>] (likely due require cache), but this should check user-installed version - this one with createRequire seems to work in practice as intended (it was now tested with monkey patching plugin instance installed in .netlify/plugins)
mrstork
previously approved these changes
Nov 21, 2024
serhalp
previously approved these changes
Nov 21, 2024
019cf7d
pieh
commented
Nov 21, 2024
| let packagePath | ||
| try { | ||
| const siteRequire = createRequire(root) | ||
| const siteRequire = createRequire(join(root, ':internal:')) |
Contributor
Author
There was a problem hiding this comment.
the previous version ended up not working when actually installed and resulted in MODULE_NOT_FOUND (that was not immediate apparent, because we swallow the error message)
mrstork
approved these changes
Nov 21, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pathnamenot assign it dohserver.tsis found@netlify/angular-runtimeversion (current one doesn't actually do anything, because it somehow is able to resolve plugin installed in<project-dir>/.netlify/plugins/node_modulesdespite usingpathsparam - probably related torequire.cache(?) )