I am trying to deploy my npm app to azure using github actions. When running npm install its giving an error with exit code 1.v Here is the error its throwing...
npm install, build, and test5s
##[error]Process completed with exit code 1.
> ejs#3.1.3 postinstall /home/runner/work/readbetter/readbetter/node_modules/ejs
> node --harmony ./postinstall.js
npm notice created a lockfile as package-lock.json. You should commit this file.
added 133 packages from 70 contributors and audited 133 packages in 3.913s
1 package is looking for funding
run `npm fund` for details
found 0 vulnerabilities
> readbetter#1.0.0 test /home/runner/work/readbetter/readbetter
> echo "Error: no test specified" && exit 1
npm ERR! code ELIFECYCLE
Error: no test specified
npm ERR! errno 1
npm ERR! readbetter#1.0.0 test: `echo "Error: no test specified" && exit 1`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the readbetter#1.0.0 test 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! /home/runner/.npm/_logs/2020-06-20T13_55_32_078Z-debug.log
##[error]Process completed with exit code 1.
what could be reason?
Here is the repo.
https://github.com/galdiatorocks/readbetter.git
If you look at your package.json you literally have "test": "echo \"Error: no test specified\" && exit 1", in there. So if you try to run the test, it runs into that error.
To solve it, you need to either not run the test, or you need to setup proper testing.
And, just running npm install works perfectly fine :)
Related
I'm trying to deploy my app to github, but I meet this mistake:
$ npm run deploy
> git-repository#1.0.0 deploy C:\Users\zarin\Desktop\projects\GIT repository
> gh-pages -d dist
The following paths are ignored by one of your .gitignore files:
node_modules
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! git-repository#1.0.0 deploy: `gh-pages -d dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the git-repository#1.0.0 deploy 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\zarin\AppData\Roaming\npm-cache\_logs\2022-08-28T16_31_01_911Z-debug.log
Not really sure what to do with node_modules here
The problem I am currently having is that we have a script in our package.json set to run single test files using the following syntax:
"singleTest": "mocha tests/$MATCH"
However, when I attempt to run this in Windows 10 with Powershell I use the following command and get the error shown:
$env:MATCH="01HOME-01FC-T01.js" && npm run singleTest
Error: No test files found: "tests/$MATCH"
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! selenium-js-example#2.0.0 singleTest: `mocha tests/$MATCH`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the selenium-js-example#2.0.0 singleTest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
It seems as if it is not setting the file name to the variable MATCH at all. I would really appreciate if someone can shed some light on what am I doing wrong or what would be the proper way to run this using Powershell 7.1.
You can chain commands in Powershell by using semicolon. You cannot use && like in bash.
$env:MATCH="01HOME-01FC-T01.js"; npm run singleTest
when I tried to run vscode-install, it would fail to sync vscode.d.ts. The problem seems random, most of our machines could not success, but two of our machines could success.
The error information is as follows:
Detected VS Code engine version: ^1.23.0
Error installing vscode.d.ts: Error: read ECONNRESET
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lispvsext#0.0.1 postinstall: `vscode-install && node ./node_modules/vscode/bin/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lispvsext#0.0.1 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:
npm ERR! C:\Users\*\AppData\Roaming\npm-cache\_logs\2019-02-15T09_28_45_624Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lispvsext#1.0.8 postinstall: `cd extension && npm install && cd ..`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lispvsext#1.0.8 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:
npm ERR! C:\Users\*\AppData\Roaming\npm-cache\_logs\2019-02-15T09_28_45_805Z-debug.log
I had a similar problem, where the VSCode engine in package.json was very old (1.32.0) compared to the current VSCode version (1.64.2). I just updated the engine to the same as my VSCode version in package.json:
"engines": {
"vscode": "^1.64.2"
},
and the tests runner proceeds instead of erroring as before.
Unfortunately, I then got another error:
Error: Running extension tests from the command line is currently only supported if no other instance of Code is running.
which is a different problem and a limitation of VSCode at the moment (1.64.2), though there is a workaround for that.
After running:
bsb -init my-react-login-app -theme react
Then, I ran the following to, as I understand, build the project:
$npm run build
But, I got the following error output:
> my-react-login-app#0.1.0 build /Users/kevinmeredith/Workspace/my-react-login-app
> bsb -make-world
Package not found: resolving package reason-react in /
File "bsconfig.json", line 1
Error: package reason-react not found or built , if it is not built
Please run 'bsb -make-world', otherwise please install it
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! my-react-login-app#0.1.0 build: `bsb -make-world`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the my-react-login-app#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! /Users/kevinmeredith/.npm/_logs/2018-06-24T01_36_13_899Z-debug.log
How can I resolve this issue?
See the readme; that template needs you to install reason-react through npm install or yarn add. After that it should work. We don't check in the entire reason-react dependency chain in the template.
I build an hybrid app using Ionic 2.
I got a windows pc and using mac virtual box for Xcode.
I can run the app on browser and android just fine in my windows.
problem is when I'm moving to mac I'm doing the same things on node JS and I get errors.
I used those lines in the terminal
ionic start/run/emulate/build Vme2
sudo ionic start/run/emulate/build Vme2
none works
this is the error I get
> ionic-hello-world# build /Users/amitaimazliah/Desktop/Vme2
> ionic-app-scripts build
[08:38:07] ionic-app-scripts 0.0.38
[08:38:07] build prod started ...
[08:38:07] clean started ...
[08:38:07] clean finished in 3 ms
[08:38:07] copy started ...
[08:38:07] ngc started ...
[08:38:07] copy finished in 262 ms
[08:38:07] build prod failed: spawn EACCES
[08:38:07] ionic-app-script task: "build"
[08:38:07] Error: spawn EACCES
npm ERR! Darwin 14.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world# build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world# build script 'ionic-app-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/amitaimazliah/Desktop/Vme2/npm-debug.log
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
[08:38:07] lint started ...
[08:38:08] tslint: src/pages/home/home.ts, line: 57
Unused method: 'setNewPhotos'
L57: private setNewPhotos()
[08:38:08] lint finished in 1.27 s
(node:2376) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: channel closed
any ideas what am I doing wrong?
thanks
You have problem when build app.Can you try use this command '
ionic hooks add
Cheer !