Comments (14)
Well I think we can do ln -s
to link the /node_modules to network volume. Just a suggestion :-D .
Do you think this is possible? Is network volume contain some limitations?
from oryx.
Also reported in here.
from oryx.
Thanks for reaching out. I can repro the issue, and we'll work on a fix. For now, disabling the performance optimizations we have for the build should make your build work. To do that, set app setting BUILD_FLAGS to "Off" (case matters, so "off" won't work"). Please let me know how it goes.
A bit of context as to why we compress node_modules
: to make builds faster, we build the node_modules
folder in a separate location in the container with faster disk IO, and copy its contents as node_modules.tar.gz
to wwwroot
, and extract its contents when running the app, also in a locatio with faster disk IO. For this app, the build is not copying the node_modules folder in a sub-directory as it should.
from oryx.
Hi, thanks for your information.
Seems that the BUILD_FLAGS
works in my case.
But here's some other problems:
When BUILD_FLAGS
is removed:
nodegit
package can be installed normallynpm dedupe
works correctly
When BUILD_FLAGS
is Off
:
nodegit
package cannot be installed due tonode-pre-gyp
error.npm dedupe
has an error withnpm ERR! Cannot read property '0' of undefined
.
Seems that this is caused by different npm version.
I modified my code to let it works, but I think that the BUILD_FLAGS
configuration should not affect npm version and node.js version.
Kudu separates the deploy environment and production environment.
I can tell that when we set BUILD_FLAGS
to Off
, Oryx will build all the things by using the node in production environment, I'm I correct?
from oryx.
Still have no idea about your flag. Your flag affects the node.js environment itself, let it not stable.
My Workaround:
I will run npm install, and move the node_modules to somewhere that oryx not discard.
And then, when the website starts, I will move that directory to node_modules
. I will put this process to prestart
phase.
This costs time when deploying, but works.
I will wait for your fix.
Thanks for your amazing product!
from oryx.
From your description, oryx might still be trying to extract node_modules when the app is starting. This will happen if oryx-manifest.toml
file is present in /home/site/wwwroot
. You can either remove this file, or just rebuild your application through app service (e.g. doing a git push or redeploying through VS Code)
from oryx.
Thanks for your reply
I did rm -fr *
in /home/site/wwwroot/
, things still happen. node-gyp won't work correctly.
from oryx.
npm dedupe
is a known issue that never solved.
I think that the flag breaks the node.js version.
from oryx.
The node_modules will be extracted to /node_modules
, is this the expected behavior?
The result is correct, but I think this is a little strange. If a user serves node_modules as a public directory, that user will get 404 when he requesting the files in node_modules
.
from oryx.
Yes, this is expected. You can find out more about why we do this, as well as how to disable this behavior, here: https://github.com/microsoft/Oryx/blob/master/doc/hosts/appservice.md#nodejs
from oryx.
@capraynor we are doing this actually and it will be published in the next release. Thank you for the suggestion, we appreciate your feedback and please keep using the product and report any issues or suggestions that you may have. For the time being I'm closing the issue
from oryx.
Still not solved on azure app service.
from oryx.
@capraynor what is the issue that you are seeing? could you file a separate issue with more details?
from oryx.
from oryx.
Related Issues (20)
- Scripts in appsvc.yaml are mangled by replacing newlines with semicolons
- Add main.js as a startup candidate for Node.js toolset
- npm ERR! Tracker "idealTree" already exists
- Issue in deploying React JS + Node JS application on Azure Devops
- Version '16.20.2' of platform 'nodejs' is not installed HOT 3
- `npm install` time is snaillike HOT 1
- Oryx fails to get package list while building .NET 8 Static Web App
- Deploying python based Azure Function from VS Code fails when latest arcgis library is included
- Http request to retrieve the default version from 'https://oryx-cdn.microsoft.io/java/defaultVersion.bookworm.txt' failed HOT 3
- Issue with latest Azure Function v1.15.0 released
- Unable to retrieve SDKs from oryx-cdn HOT 7
- Failed during oryx build due to \n/opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracte
- Deployment Failed - Detecting platforms... Error: Oops... An unexpected error has occurred. Error: System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1
- NodeJS 20LTS Oryx deploy via local git failing
- let HOT 1
- Deployment failure for Next.js app HOT 2
- oryx cannot build some reference like "xmlsec" automatically
- Consider removing/masking account keys from logs when deploying Azure Functions for the first time HOT 2
- Azure Deployment failed Http request to retrieve the SDKs available to download from 'https://oryx-cdn.microsoft.io' HOT 9
- [BUG] build.sh: command substitution: line 306: syntax error near unexpected token `' ','
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oryx.