Starting with meanJS - mean-stack

I have a small problem to start meanJS following the installation with the generator YO. I can not solve my problem. Can someone help me ? Everything is well installed and when I run the command "npm start", that's what I have ...
Running "watch" task
Waiting...
Running "nodemon:dev" (nodemon) task
Warning: watch /home/ludo/workspace/lab/meanjs/mean/modules/core/server/views/ ENOSPC
Done, without errors.
[nodemon] 1.12.5
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: server.js config/**/*.js modules/*/server/**/*.js
[nodemon] starting `node --debug server.js`
[nodemon] Internal watch failed: watch /home/ludo/workspace/lab/meanjs/mean/server.js ENOSPC
(node:19618) [DEP0062] DeprecationWarning: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead.
Warning: (node:19618) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Used --force, continuing.
Done, but with warnings.

Related

How use nodemon on VS code

I've been trying to use nodemon on vs code by changing the scripts section on a Json file to "devStart":"server.js" from "test": "echo "Error: no test specified" && exit 1" then using git bash to run it by using " $ npm run devStart" and I get this error every time
"npm ERR! missing script: devStart
npm ERR!
npm ERR! Did you mean this?
npm ERR! start"
how can i fix this error?
I have tried to download nodemon globally looking at an instructional video here's the link https://www.youtube.com/watch?v=ZIbAtxPq5_I but unfortunately after I followed all the steps and restarted VS code it didn't work when I tried to connect it in the terminal to my js file. How can I fix this?

Installing cypress with ZScaler Proxy

When I'm trying to install Cypress with the Zscaler Cloud Connector on a Windows 10 machine, I get the following error:
911 error
911 error Platform: win32-x64 (10.0.19044)
911 error Cypress Version: 10.7.0
912 error [FAILED] The Cypress App could not be downloaded.
912 error [FAILED]
912 error [FAILED] Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration
912 error [FAILED]
912 error [FAILED] Otherwise, please check network connectivity and try again:
912 error [FAILED]
912 error [FAILED] ----------
912 error [FAILED]
912 error [FAILED] URL: https://download.cypress.io/desktop/10.7.0?platform=win32&arch=x64
912 error [FAILED] Error: unable to get local issuer certificate
912 error [FAILED]
912 error [FAILED] ----------
912 error [FAILED]
912 error [FAILED] Platform: win32-x64 (10.0.19044)
912 error [FAILED] Cypress Version: 10.7.0
913 verbose exit 1
914 timing npm Completed in 11016ms
915 verbose unfinished npm timer reify 1661966146931
916 verbose unfinished npm timer reify:build 1661966156229
917 verbose unfinished npm timer build 1661966156230
918 verbose unfinished npm timer build:deps 1661966156230
919 verbose unfinished npm timer build:run:postinstall 1661966156255
920 verbose unfinished npm timer build:run:postinstall:node_modules/cypress 1661966156255
921 verbose code 1
922 error A complete log of this run can be found in:
922 error C:\Users\eric\AppData\Local\npm-cache\_logs\2022-08-31T17_15_46_738Z-debug-0.log
I followed the suggestions at https://on.cypress.io/proxy-configuration and set the HTTP_PROXY environment variable to match what's displayed in the Script address of the Proxy Settings. (Here it is displayed in a cmd prompt):
C:\Windows\system32>echo %HTTP_PROXY%
http://127.0.0.1:9000/systemproxy-9a8d7abc.pac
I've tried installing cypress using a new Power Shell prompt after setting the environment variable, in case my old Power Shell prompt had a stale environment.
However, I still get the same error. In the Zscaler settings I've tried temporarily turning off the Service Status, but it still fails with the same error.
I was able to come up with a workaround based on the instructions here: while installing cypress through command :npm install cypress --save-dev getting error as The Cypress App could not be downloaded
In cmd I ran:
set CYPRESS_INSTALL_BINARY=C:\Users\eric\Downloads\cypress.zip
followed by:
npm install cypress --save-dev
I tried doing it in power shell, but if I ran a:
set CYPRESS_INSTALL_BINARY=~/Downloads/cypress.zip
dir env:
It wouldn't show me the CYPRESS_INSTALL_BINARY in my environment.
Note that I had to switch to an absolute path in cmd, because it didn't understand ~
I then realized that I needed an older version of cypress, so I tried doing a:
npm uninstall cypress
up to date, audited 509 packages in 970ms
62 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
but it doesn't seem to have fully uninstalled, because I see:
c:\MyPath>npx cypress run
There is a cypress.json file at the path: c:\MyPath
Cypress version 10.0.0 no longer supports cypress.json.
Please run cypress open to launch the migration tool to migrate to cypress.config.{js,ts,mjs,cjs}.
https://on.cypress.io/migration-guide
I realized that although the npm cypress uninstall appeared to have worked. I still had files left in the C:\Users\eric\AppData\Local\Cypress directory. I deleted these files and reinstalled cypress 9.6.1 after downloading it from https://download.cypress.io/desktop/9.6.1 Doing a
set CYPRESS_INSTALL_BINARY=C:\Users\eric\Downloads\cypress_old.zip
and then a
npm install cypress
and I was able to run
npx cypress run
without it complaing that
Cypress version 10.0.0 no longer supports cypress.json.

Yarn build error exit code 1 metaplex nft marketplace

I'm trying to make a metaplex marketplace and every time I run yarn build I get this
Node.js v17.2.0
error Command failed with exit code 1.
lerna ERR! yarn run build exited 1 in 'gumdrop'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I have tried flushing the yarn cache, I've tried updating yarn, I've tried the other examples in another Stack Overflow post I've tried so many things and I can't list or remember them all.
Did you try to downgrade Node? sudo n v16.13.2

vue awesome swiper install failed on windows

I'm trying to install vue-awesome-swiper with npm using this command
npm i vue-awesome-swiper --save
I'm getting this error
npm ERR! Line breaks can't be quoted on Windows
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USERNAME\AppData\Local\npm-cache\_logs\2021-04-06T18_35_21_789Z-debug.log
I opened the log and I figured that the problem is caused by this line here
80 info run swiper#5.4.5 postinstall node_modules/swiper echo "[35m[1mLove Swiper? Support Vladimir's work by donating or pledging on patreon:[22m[39m
80 info run > [32mhttps://patreon.com/vladimirkharlampidi[0m
80 info run "
As you can see from the log here it's triggering postinstall script and it's just trying to print a message to support the package author.
To fix this issue you can simply install the package without running any scripts with the --ignore-scripts flag like this:
npm i vue-awesome-swiper --save --ignore-scripts

npm command create-react-app failled

I am trying to test reactjs on my computer (mbp pro 2017) running OsX sierra 10.12.6.
I have followed the Facebook tutorial:
Make sure you have a recent version of Node.js installed. (done)
Follow the installation instructions to create a new project. https://facebook.github.io/react/docs/installation.html#creating-a-new-application
But i have a problem on this second step !
I am not behind a proxy.
my network is ok.
The repository is set to registry.npmjs.org
i can read the url : https://registry.npmjs.org/create-react-app
But this domain is not found even on external DNS wsg.intra.corp.grp
I'am stuck, any help will be nice !
$ npm install -g create-react-app
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND wsg.intra.corp.grp wsg.intra.corp.grp:8080
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! ~/.npm/_logs/2017-09-01T08_15_13_521Z-debug.log
And the log file :
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'create-react-app' ]
2 info using npm#5.3.0
3 info using node#v8.4.0
4 verbose npm-session 4811d091ad74f9ef
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for create-react-app#latest request to https://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND wsg.intra.corp.grp wsg.intra.corp.grp:8080
8 verbose type system
9 verbose stack FetchError: request to https://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND wsg.intra.corp.grp wsg.intra.corp.grp:8080
9 verbose stack at ClientRequest.req.on.err (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/index.js:68:14)
9 verbose stack at emitOne (events.js:115:13)
9 verbose stack at ClientRequest.emit (events.js:210:7)
9 verbose stack at onerror (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js:106:9)
9 verbose stack at callbackError (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js:126:5)
9 verbose stack at <anonymous>
9 verbose stack at process._tickCallback (internal/process/next_tick.js:188:7)
10 verbose cwd /Users/franckfournier/PycharmProjects/projectX/react
11 verbose Darwin 16.7.0
12 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "create-react-app"
13 verbose node v8.4.0
14 verbose npm v5.3.0
15 error code ENOTFOUND
16 error errno ENOTFOUND
17 error network request to https://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND wsg.intra.corp.grp wsg.intra.corp.grp:8080
18 error network This is a problem related to network connectivity.
18 error network In most cases you are behind a proxy or have bad network settings.
18 error network
18 error network If you are behind a proxy, please make sure that the
18 error network 'proxy' config is set properly. See: 'npm help config'
19 verbose exit [ 1, true ]
You seem to be behind a corporate proxy, as wsg.intra.corp.grp:8080 is mentioned in the logs.
You need to configure the proxy like shown in this guide.
Hope this helps!
Run below commands on your command prompt. Make sure node and npm are installed.
npm config rm proxy
npm config rm https-proxy
open this link in your browser: https://registry.npmjs.org/
Run below command to set registry.
npm config set registry https://registry.npmjs.org/
Hope its help : )
I solved this issue just by,
go to settings>Network and Internet>Proxy and then off Automatically detect settings under Automatic proxy setup on Windows. And then the installation worked fine.
Following this post on Github, and adding "104.18.95.96 registry.npmjs.org" to my /etc/hosts solved my problem.
If you still face issues follow these steps:
Go to Settings > Network and Internet > Proxy and find out the address and port
Go to command prompt or terminal depending on your machine(tip: hit Win + R and type cmd). In the command prompt type the following commands
npm config set proxy http://usernamepassword#proxy-server-url:port
npm config set https-proxy http://usernamepassword#proxy-server-url:port
Username and password really isn’t needed 9 times out of 10, the last 2 will suffice. Proxy-server-url is your address and your port is the port number. Once it’s set close command prompt and re-open it. And voila! you can now install all your packages
Source: https://medium.com/#ogbemudiatimothy/using-npm-install-behind-a-corporate-proxy-server-db150c128899

Resources