I am trying to push Kibana
https://www.elastic.co/products/kibana
to Bluemix PaaS via cloudfoundry. At cf push i get this error
Error uploading application.
GetFileAttributesEx C:\Users\asd\qwe\zxc\installedPlugins\shield\node_modules\eslint\node_modules\file-entry-cache\node_modules\flat-cache\node_modules\del\node_modules\globby\node_modules\glob\node_modules\inflight\node_modules\wrappy\package.json: The system cannot find the path specified.
i can see that the package.json is actually present at that path! How do i resolve this?
cf --version
cf version 6.12.4-b4b6af1-2015-09-18T10:55:12+00:00
The error is due to the file path being too long. Add the node_modules directory to a .cfignore file in the app's root directory and then push again. The node_modules won't be uploaded and will instead be installed as part of the staging process.
See https://github.com/IBM-Bluemix/nodejs-cloudant/blob/master/.cfignore for an example .cfignore.
You could also switch to npm v3 which keeps the node_modules directory flatter, but you still wouldn't normally push it with your app.
Related
I want to deploy a Web App (Node) to Azure App Services (Linux) over Kudu.
I followed the instructions and first tried it with Node 14 as the stack. The build processes crashed during make cause of some version problems I guess.
Now I have downgraded the stack to Node 12. When I try to push again I get this error:
remote: hooks/post-receive: 4: hooks/post-receive: /opt/Kudu/KuduConsole/kudu.dll: not found
Before the push worked fine and npm was triggered.
Any suggestions?
Edit:
When i try to start the Bash in Kudu i get this error
Kudu Error 1
When add /newui to the URL where you can reach Kudu you can start up a bash inside Kudu. From there you can delete rm everything inside the /home folder. After that a new push worked and also the deployment
I am currently using nodejs that is deployed in ebs on aws. I have a function that will write a pdf and then email it off but it says the file path can't be found. I've verified the project file seems to be /var/app/current/, but changing the reference of the file path doesn't seem to remove the error. Any idea how to go about fixing this?
The /var/app/current/ does not exist initially. Its only created at the very last stage of your deployment.
The deployment happens in /var/app/staging/ folder, and at the very last, once everything finishes, /var/app/staging/ is moved into /var/app/current/.
Thus, I would not recommend using absolute paths in your project or config files. Its better to use relative path or container_commands for config scripts:
The specified commands run as the root user, and are processed in alphabetical order by name. Container commands are run from the staging directory, where your source code is extracted prior to being deployed to the application server.
in my node js web app, i use node version = 6.9.1:
"engines": {
"node": "6.9.1"
}
and when i do deployment with
git push azure master
it shows correct node is used.
...
remote: Selected node.js version 6.9.1. Use package.json file to choose a different version.
remote: Selected npm version 3.10.8
...
but my app service is not started correctly because of node.exe crashed.
later i output the used node version number in my entry point script, i get
Node version:v0.6.20
from file D:\home\LogFiles\Application\xxxx-stdout-xxxx.txt
so obviously Azure App service is not using my defined version of node.exe.
later i follow https://learn.microsoft.com/en-us/azure/nodejs-specify-node-version-azure-apps
add below text in file D:\home\site\wwwroot\iisnode.yml to fix this issue.
nodeProcessCommandLine: "D:\Program Files (x86)\nodejs\6.9.1\node.exe"
so my question is why Azure App Service (iisnode) is not using my defined node version in package.json ?
To change the NodeJs version of Azure App Service by using iisnode.yml(which won’t change node version on kudu cli or during deployment), you need to set iisnode.yml file manually in your app root folder with including below line as you have mentioned:
nodeProcessCommandLine: "D:\Program Files (x86)\nodejs\5.9.1\node.exe"
Then you need to set iisnode.yml file using package.json during source control deployment.
Azure Source Control deployment process would involve below steps
1. Moves content to azure web app
2. Creates default deployment script, if there isn’t one(deploy.cmd, .deployment files) in web app root folder
3. Run’s deployment script where it creates iisnode.yml file if you mention nodejs version in package.json file > engine
Reference: https://blogs.msdn.microsoft.com/azureossds/2016/04/20/nodejs-and-npm-versions-on-azure-app-services/.
Or else you can use App Settings in Azure portal to change the version of NodeJs.
I know that there's couple posts like this one, but solution of any of them works for me.
Here is what I receive when I go for git push heroku master:
Please support. Ignoring node_modules is not working.
Docpad app - package.json file is updated according to docpad's manual.
I also have Procfile set up as in the link above.
PS. I have tried to deploy docpad app via openshift, but while Im going with manual from http://docpad.org/docs/deploy/ I receive error at step 5.
The application 'appname' is configured for git reference deployments but the
artifact provided ('https://github.com/myusername/appname#master') is a url.
Please provide a git reference to deploy (branch, tag or commit SHA1) or
configure your app to deploy from binaries with 'rhc configure-app appname
--deployment-type binary'.
If I configure myapp to deployment-type binary it isnt working neither.
The plugin which heroku tries to install returned 404 and the installation fails due to that.
Verify that the plugin is indeed public and not something you have wrote or used locally.
There is no package with this name hosted on the registry you use.
Remove the line with "docpad-plugin-blah": "2" from your package.json file. That line was provided in the docs simply to show you how to install plugins, but there's no such plugin as blah.
"dependencies": {
"docpad": "6"
},
I strongly recommend that you read through the Getting Started on OpenShift to get an overview of the development workflow using Git.
That being said, and if you really meant to use git reference deployments and you know why you are using them, then read through the Managing Deployments section on the developers page of OpenShift and find out how to properly set up git reference deployments. For instance, 'https://github.com/myusername/appname#master' is not a valid git url and therefore it cannot be cloned.
When deploying my application to CloudControl I suddenly get an unexpected error while pushing the code.
remote: [1G-----> Kohana Framework detected
remote: mkdir: cannot create directory `application/cache': No such file or directory
remote: [1G ! cloudControl push rejected, failed to compile php app
I do not use the typical folder structure of Kohana. I place the system and module folder outside of my application folders. This allows me to keep the application clean and works fine in Kohana.
For example:
-doc_root
-- modules (all modules)
-- system (kohana framework only)
-- app1 (some single application)
--- application
---- classes... (and so on)
--- webroot
---- index.php
Because I am aware of a LoadBalances document root system I do not have any tmp or cache folders inside of my doc_root.
This error seems to be new and makes it kinda impossible for me right now to push and deploy any changes to my application.
Do I really need to change my folder layout? Can the Buildpack (https://github.com/cloudControl/buildpack-php) detect my structure somehow? Can I tell the Buildpack what my structure looks like?
This layout is currently not supported by the buildpack. You can set your document root manually though (in this example AFAICT the webroot would be /app/www/app1/webroot).