Error in Terminal when trying to run psets for App Academy - macos

I am currently working through App Academy Open and in a JS section. Yesterday I ran the pset and created solutions and no problem. In fact redownloaded my solutions and ran the tests and had no issues.
npm install and then npm run test which result in a message if you passed that question or not. I believe AA Open is using Mocha (have it installed and actually reinstalled), but I am getting an error in my terminal now that I have been googling and cannot seem for the life of me to figure out.
This is the error I am getting:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! js-refactor-project#1.0.0 test: `mocha`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the js-refactor-project#1.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I am baffled and not sure. Any help would greatly be appreciated.

Related

Errors on "npm run dev" (after Laravel clean install)

I'm very excited to learn Laravel and create a webapp based on a bootstrap template I bought (OneUI). I successfully installed Laravel (the /public route returns the default view to my browser correctly). Now i'm following the install guide of the template, and i'm experiencing problems with npm commands that return errors that I can't understand (I'm not familiar with npm).
I'd really appreciate if somebody could help me to find what's wrong so I could finally using Laravel with the Templates.
As requested in the OneUI documentation, i copy the public & resources folders, the routes/web.php file, and the webpack.mix.js file. Then, i install the npm dependencies running the following command :
npm i browser-sync browser-sync-webpack-plugin sass sass-loader bootstrap#^4.5.3 jquery#^3.5.1 jquery-scroll-lock#^3.1.3 jquery.appear#^1.0.1 js-cookie#^2.2.1 popper.js#^1.16.1 simplebar#^5.3.0 -D
This seems to run OK with a few warnings about some deprecated packages.
Then i run :
npm run dev
I get this return :
> # dev /volume1/web/dev/myproject
> npm run development
> # development /volume1/web/dev/myproject
> mix
events.js:287
throw er; // Unhandled 'error' event
^
Error: spawn npx ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn npx',
path: 'npx',
spawnargs: [
'webpack',
'--progress',
'--config=node_modules/laravel-mix/setup/webpack.config.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: `mix`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # development 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! /var/services/homes/admin/.npm/_logs/2021-01-25T22_32_54_150Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # 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! /var/services/homes/admin/.npm/_logs/2021-01-25T22_32_54_340Z-debug.log
This is on Linux, directly on my Synology (I don't use anything like a VM/Docker).
To install Laravel, I simply did this :
Installed php7.4 + libraries
Installed composer
Went into my web folder and entered the command : composer create-project laravel/laravel myproject
Added write access to my http user on the storage folder
I tryied this already without success :
As advised on other websites:
rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install
npm run dev
I tryied to do a npm install and npm run dev on a clean Laravel Install (before the install of all the packages required by the OneUI templates) to try to see if it's related to the OneUI files or the npm dependencies I installed. I have the same errors. So I understand it's not related to the OneUI install, but an issue with npm / my Laravel files (?).
In advance, thanks a lot for your help !

STRAPI : Error while running command develop: undefined

I am not able to npm start STRAPI, it shows follwiting error. I'm using STRAPI 3.1.3
> my-project#0.1.0 strapi /Users/mac/Documents/Development_env/jobBackend/my-project
> strapi "develop"
Error while running command develop: undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-prject#0.1.0 strapi: `strapi "develop"` npm ERR! Exit status 1
npm ERR!
macs-Air:my-project mac$ npm start
> my-project#0.1.0 start /Users/mac/Documents/Development_env/jobBackend/my-project
> strapi start
Error while running command start: undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-project#0.1.0 start: `strapi start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-project#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! /Users/mac/.npm/_logs/2020-08-13T17_02_08_854Z-debug.log
I just saw this error too. I upgraded to strapi 3.1.4 and got a more useful error indicating a syntax error in one of my functions files. After fixing that, strapi commands worked as ever.
npm run build
npm start
Or install strapi-cli globally using below command.
npm install -g strapi#beta
After successful installation use
strapi develop
to start the project

I am getting a compilation error when I try to deploy my Phoenix Elixir app to Heroku

I am very unfamiliar with the deployment process and how to interpret the build log on Heroku. I'm trying to deploy my Phoenix Elixir app and have gone through the process as outlined on https://hexdocs.pm/phoenix/heroku.html. However, I am get the following error in my build logs:
npm ERR! Linux 4.4.0-1062-aws
npm ERR! argv "/tmp/build_cb2fdf13a1883f06eae3f7c5297f7b64/.heroku/node/bin/node" "/tmp/build_cb2fdf13a1883f06eae3f7c5297f7b64/.heroku/node/bin/npm" "run" "deploy"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! # deploy: `webpack --mode production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # deploy script 'webpack --mode production'.
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 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack --mode production
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/build_cb2fdf13a1883f06eae3f7c5297f7b64/assets/npm-debug.log
I've updated to the latest version of node.js and npm as the logs suggested.
Thanks!
The issue isn't with the version of node that you have locally. If you look at the logs it shows that heroku is trying to use node v6.9.2. That is a really old version of node that won't work. You need to use heroku-buildpack-phoenix-static so that you can define the node version the heroku is trying to use. Add the buildpack with the cli:
$ heroku buildpacks:add https://github.com/gjaldon/heroku-buildpack-phoenix-static.git
Then create a file phoenix_static_buildpack.config in your project root directory. In that file define the version of node to use:
node_version=12.18.1
This will tell heroku to use that version of node. After that try to redeploy and the issue should be resolved.
If you have more issues then check out the phoenix docs on deploying to heroku. It has a lot of useful information:
https://hexdocs.pm/phoenix/heroku.html

Vulcan.js with git bash on windows using powershell

I am using bash on Ubuntu on windows, I open powershell and the run command bash I navigate to the Vulcan-starter repo I cloned. It is a Meteor project. I have installed meteor using the curl command as recommended on Meteor's website. I am using node version 8.11.1 I run npm install and everything installs fine, when I run npm start this is where I get the errors. Here is the error below, and a more detailed log is included in this gist.
MongoDB had an unspecified uncaught exception.
This can be caused by MongoDB being unable to write to a local database.
Check that you have permissions to write to .meteor/local. MongoDB does
not support filesystems like NFS that do not allow file locking.
npm ERR! code ELIFECYCLE
npm ERR! errno 254
npm ERR! Vulcan#1.8.11 start: `meteor --settings settings.json`
npm ERR! Exit status 254
npm ERR!
npm ERR! Failed at the Vulcan#1.8.11 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! /home/anderskitson/.npm/_logs/2018-03-30T21_21_54_469Z-debug.log

Unable to run heroku-cli commands - issues with npm

When trying to run heroku fork on Mac OS X Yosemite, I all the sudden am running into critical errors that render the CLI useless. This problem did not occur previously and I believe the CLI may have updated itself and started causing problems.
~ ☽ heroku fork -a oldapp newapp
Installing plugin heroku-fork... npm ERR! Darwin 14.0.0
npm ERR! argv "/Users/Me/.heroku/iojs-v2.0.0-darwin-x64/bin/iojs" "/Users/JJ/.heroku/iojs-v2.0.0-darwin-x64/lib/node_modules/npm/cli.js" "install" "heroku-fork"
npm ERR! node v2.0.0
npm ERR! npm v2.9.0
npm ERR! code ETARGET
npm ERR! notarget No compatible version found: heroku-cli-util#'>=1.9.0 <2.0.0'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["1.0.0","1.0.1","1.1.0","1.2.0","1.3.0","1.4.0","1.5.0","1.7.0","1.8.0","1.8.1"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'heroku-fork'
npm ERR! notarget
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Me/.heroku/npm-debug.log
ERROR: exit status 1
Usage: heroku COMMAND [--app APP] [command-specific-options]
Help topics, type "heroku help TOPIC" for more details:
heroku version # print the version
heroku plugins # manage plugins
heroku update # update heroku-cli
I've tried removing and reinstalling the heroku cli via: homebrew, the official installer, even the rubygem. Since the error seems to suggest there's an npm problem, I updated npm and all of my npm packages, and was even able to explicitly run npm install -g heroku-cli-util#1.10.0 but none of that has made any difference.
What is going wrong here/how can I fix this? This is a critical issue for me.
I think the cache got stuck somehow, try deleting ~/.heroku and trying again.
EDIT: turns out this was an issue with caching on the Heroku private npm server.

Resources