I am trying to deploy an example app on the azure portal and am encountering some difficulties.
At first I'm just testing, so I've created an angular app with just ng new poc-pwa-angular-v2. After that I went up to a Bitbucket repository.
In Azure I created a web application and in the deployment options I connected on bitbucket and set my master branch.
I tried to generate the scripts with kudu (deploy.cmd and .deployment), but I got an error on the first deploy.
Can anyone give a tip?
Look at my log.
Command: deploy.cmd
Handling node.js deployment.
Creating app_offline.htm
KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
Copying file: 'package.json'
Deleting app_offline.htm
Invalid start-up command "ng serve" in package.json. Please use the format "node <script relative path>".
Looking for app.js/server.js under site root.
Missing server.js/app.js files, web.config is not generated
The package.json file does not specify node.js engine version constraints.
The node.js application will run with the default node.js version 10.6.0.
Selected npm version 6.1.0
> poc-pwa-angular-v2#0.0.0 postinstall D:\home\site\wwwroot
> npm run build
> poc-pwa-angular-v2#0.0.0 build D:\home\site\wwwroot
> ng build
'ng' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! poc-pwa-angular-v2#0.0.0 build: `ng build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the poc-pwa-angular-v2#0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\local\AppData\npm-cache\_logs\2018-11-13T22_16_35_989Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! poc-pwa-angular-v2#0.0.0 postinstall: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the poc-pwa-angular-v2#0.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Failed exitCode=1, command="D:\Program Files (x86)\nodejs\10.6.0\node.exe" "D:\Program Files (x86)\npm\6.1.0\node_modules\npm\bin\npm-cli.js" install --production
npm ERR! D:\local\AppData\npm-cache\_logs\2018-11-13T22_16_36_053Z-debug.log
An error has occurred during web site deployment.
Invalid start-up command "ng serve" in package.json. Please use the format "node <script relative path>".\r\nMissing server.js/app.js files, web.config is not generated\r\n'ng' is not recognized as an internal or external command,\r\noperable program or batch file.\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! poc-pwa-angular-v2#0.0.0 build: `ng build`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the poc-pwa-angular-v2#0.0.0 build script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR! D:\local\AppData\npm-cache\_logs\2018-11-13T22_16_35_989Z-debug.log\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! poc-pwa-angular-v2#0.0.0 postinstall: `npm run build`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the poc-pwa-angular-v2#0.0.0 postinstall script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR! D:\local\AppData\npm-cache\_logs\2018-11-13T22_16_36_053Z-debug.log\r\nD:\Program Files (x86)\SiteExtensions\Kudu\78.11022.3613\bin\Scripts\starter.cmd deploy.cmd
The issue is that on Azure Angular cli is not installed.
You will need to do ng build locally(or as part of your build and release pipe line. You can also use Azure DevOps builds for that where you have 240 build minutes for free) and upload it to (just options):
Azure App service.
Upload it to blob storage and use Azure functions proxy to serve your files.
If you need server side rendering then you will need to upload it as an NodeJs app or part of .net app
Thanks for the time of yours, in this case I removed the package.json script block and went up again and it worked.
...
"version": "0.0.0",
"scripts": {
},
...
Related
im useing the latest version of electron forge to make my app, so to make sure that the setup worked i ran the make command and it didn't work.
error:
PS D:\javascript\testing\New folder> cd my-app
PS D:\javascript\testing\New folder\my-app> npm run make
my-app#1.0.0 make D:\javascript\testing\New folder\my-app
electron-forge make
✔ Checking your system
✔ Resolving Forge Config
An unhandled rejection has occurred inside Forge:
Error: Could not find module with name: #electron-forge/maker-squirrel. Make sure it's listed in the
devDependencies of your package.json
at _default (D:\javascript\testing\New folder\my-app\node_modules#electron-forge\core\src\api\make.ts:132:15)
at D:\javascript\testing\New folder\my-app\node_modules#electron-forge\cli\src\electron-forge-make.ts:44:5
Electron Forge was terminated. Location:
{}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app#1.0.0 make: electron-forge make
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app#1.0.0 make script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\nycas\AppData\Roaming\npm-cache_logs\2021-09-04T01_06_58_366Z-debug.log
PS D:\javascript\testing\New folder\my-app>
i have #electron-forge/maker-squirrel and its a brand new project that I literally just made
help is appreciated.
This error is shown whenever i try to build the project. Can someone please help me with this
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! covid-19-world#0.1.0 build: react-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the covid-19-world#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\uniqf\AppData\Roaming\npm-cache_logs\2020-09-02T16_41_30_577Z-debug.log
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run build" terminated with exit code: 1.
You can try the following -
Delete the node_modules folder
Delete the package-lock.json if it exists
run npm install in the terminal
Yes I found the problem and solved it by removing the cache, Doing what SFUE said above and created a new project with all the source code of earlier and I was able to build the project
'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bookbhandar#0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bookbhandar#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Laxman\AppData\Roaming\npm-cache_logs\2020-08-22T18_25_37_539Z-debug.log
Can some one help me with this error?
It seems like react-scripts is not installed into your node_modules folder. Try to check if you are running the command on the correct folder and if the react-scripts dependency is in the package.json file.
Otherwise try to delete the node_modules folder and run npm i.
Im new at Gatsby , when I try to start the Gatsby project gatsby develop --port 8080 , I'm meeting the following error:
WorkerError: Processing C:/Users/AOmurzakov/Desktop/Job/landings/packages/project-business/.cache/gatsby-source-filesystem/6e42032743dd2dda7e331865dd496bd9.png failed
Original error:
jobs-manager.js:314 exports.enqueueJob
[landings]/[gatsby]/dist/utils/jobs-manager.js:314:23
runMicrotasks
task_queues.js:93 processTicksAndRejections
internal/process/task_queues.js:93:5
not finished run queries - 2.879s not finished Generating image
thumbnails - 2.859s
pages
In Progress
#project/businessnpm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR!
lerna# project-business: cd packages/project-business && gatsby
develop --port 8080 npm ERR! Exit status 1 npm ERR! npm ERR! Failed
at the lerna# start:project-business script. npm ERR! This is probably
not a problem with npm. There is likely additional logging output
above.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\AOmurzakov\AppData\Roaming\npm-cache_logs\2020-02-12T05_22_16_490Z-debug.log
PS C:\Users\AOmurzakov\Desktop\Job\landings>
I was trying to delete .cach by gatsby clean . It didnt work
Also I was trying to start the project with
12 and 10 version of Node
But it had no effect , same error. Can someone advise ?
Following this GitHub comment and the one above it.
I ran the following commands and it solved the problem in my case.
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install
npm run dev
Windows 10
node v8.9.2
npm 5.5.1
installed vue-cli through the use of npm but entering 'npm run dev' resulted in an error.
this is error message
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-simple#1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --open --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webpack-simple#1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hansol\AppData\Roaming\npm-cache\_logs\2017-12-08T04_14_50_859Z-debug.log
It appears as though you havent installed the node modules / dependencies.
Please try and run a
npm install
And see if that works
I used to face this problem when the port is busy.
So confirm the port you are opening for the dev server.
you can also change the port using a flag "--port 3000".