I can't deploy my ExpressJS app to Heroku or OpenShift hosting. On my MacBook Pro all works perfectly, but it go to crash when I try to deploy it on hosting.
error Error: shasum check failed for /app/tmp/npm-403-gj-8PMyB/1387967953013-0.7812028499320149/tmp.tgz
344 error Expected: f99cd60b91df7e6669c59ac2b55c4bfc65ff9494
344 error Actual: c4a5f6cf7f807d89d1aa0babe686b434426206b6
openshift log, heroku log
I had the same problem on Heroku before that I did not figure out what caused it.But this is how I fixed mine:
first remove the dependency (in your case it could be process-pwd ) from package.json file
open the terminal app on your mac and go to you project folder
run the install command for the package that fails
npm install moduleName
this will install a local copy of the module in your project folder inside node_modules folder
deploy the app again
Hope this works but you have to figure out which module actually fails :)
Related
So I was trying to deploy my react app to an Azure Web App.
I used a Github Action to build and install the App and then ZIP Deploy it to Azure.
The Problem is that once I open up the WebApp Page it shows me an Application Error (react-scripts could not be found).
I found out that once I copy the react-scripts.cmd / ps1 (from local /node_modules/.bin) to the node_modules/.bin folder of the webapp "https://{WEBAPP-NAME}.scm.azurewebsites.net" it works.
Unfortunately I would have to do that after every build.
How can I come up with a solution to this error?
What I already tried:
Update node and npm
Remove package-lock
Thanks in advance
Max
My package.json:
It looks like this issue: npm package.json scripts not being called
Try running npm run-script if you want to execute a script that is not executed by a built-in npm command.
So I found out, that react-scripts is only working in dev environments. But Azure uses a production env. Therefore the github action not only has to install the prod node_modules (npm install) but also the dev modules (npm install --only=dev).
Reference:
https://github.com/mars/create-react-app-buildpack/issues/32#issuecomment-276081892
I have Created a new angular project and converted it to universal. After running npm run build:ssr i got file structure like this
dist
----my-project
---browser
---server
and when i run command npm run serve:ssr my server is running on port localhost:4000 but now i want to host my project on my siteground hosting server where i uplaod my dist folder file (browser and server) using filezila, but i got an error 404 then i upload package.json file and connect through ssh to my terminal and install first node after that i put command npm install on derectory where i have upload all file with package.json but again i am fail. please if any one have idea to help me.
I have tried to deploy my Nestjs deploying on IIS server. I have configured iisnode on IIS that works fine for express application but I am getting errors for missing modules for nestjs. I have tried following commands for building production package
npm run start:prod
and
npm run webpack
but failed to deploy on IIS. How can I build a deployment package?? so I can deploy. I am new with nodejs and Nestjs.
Look at the project's package.json. You'll see that start:prod is a script that runs node on the compiled output of the project. You get the compiled output by running:
npm run prestart:prod
that will re-build your app into the dist folder.
So you can
Zip up the dist folder
deploy to the target host
Unzip it
Try running iisnode on it
let me know how that works
I've just installed nodejs and angular CLI successfully, but when I tried to create(with ng new, running the git bash with admin privileges) my first(and then second) app I got an error(same error twice: one for each new app):
Image with the error
Using windows 10, 64bit
Ok you are doing it with npm, I had faced the same error. It is due to the privileges in your system. you can run npm cache clean and try.
If that still doesnt work I suggest you try it with yarn.
I have deployed the mean app on azure ubuntu box. I have installed all the modules and dependencies of node using npm install and bower dependencies using bower install. The app in logs show that it is started on port 3000 but when I see the browser console it show this error:
aggregated.js:11 Uncaught Error: [$injector:modulerr]
http://errors.angularjs.org/1.5.5/$injector/modulerr?p0=mean&p1=Error%3A%20…
http%3A%2F%2Fsecondreveiw.cloudapp.net%2Fmodules%2Faggregated.js%3A26%3A19)
I have aggregated true in my development.js config file.
By the way the app is working fine locally on my windows machine.