i have a web-application. I want to use nodemon with it. To start my application need to run 'node ./bin/www', but nodemon default run another file. And my web-applications doesn't aviable.
When i type in cmd
nodemon
i got:
[nodemon] 1.14.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node app.js`
but i want change default start file from node app.js to node ./bin/www
How can i do this?
package.json
{
"name": "loc8r",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "~1.18.2",
"cookie-parser": "~1.4.3",
"debug": "~2.6.9",
"express": "~4.15.5",
"jade": "~1.11.0",
"mongoose": "4.13.9",
"morgan": "~1.9.0",
"nodemon": "^1.14.9",
"readline": "1.3.0",
"request": "^2.83.0",
"serve-favicon": "~2.4.5"
},
"main": "app.js",
"devDependencies": {},
"author": "",
"license": "ISC",
"description": ""
}
nodemon should pick up what ever file is in "main": "file_to_be_executed.js", so if www is your file to be executed, change: "main": "app.js", to: "main": "./bin/www",
Related
My electron app project uses create-react-app and my main process needed the electron-devtools-installer module. I'm using electron-forge for building the app. Now after running npm run make to package and built the app, I'm getting this error message
Error: Cannot find module 'electron-devtools-installer'
after opening the app. I'm not getting this error when I simply run electron ., thus I suspect the module is not being included on the packaging.
Now the said module is for development only, I could simply write a logic to ignore it when in production mode but what happens when I really need a 3rd party modules in my main process in the production, so how do I include the dependencies modules in the packaging?
I moved the electron-devtools-installer mode in dependencies key in package.json but it still doesn't work.
My package.json contains:
{
"name": "myapp",
"version": "0.1.0",
"private": true,
"homepage": ".",
"description": "some description",
"main": "main/init.js",
"author": "anonymouse",
"license": "MIT",
"dependencies": {
"#testing-library/jest-dom": "^5.16.5",
"#testing-library/react": "^13.4.0",
"#testing-library/user-event": "^13.5.0",
"electron-devtools-installer": "^3.2.0",
"electron-squirrel-startup": "^1.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "electron-forge start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"dev": "concurrently -k \"react-scripts start\" \"npm:electron\"",
"electron": "wait-on tcp:3000 && electron .",
"package": "react-scripts build && electron-forge package",
"make": "react-scripts build && electron-forge make",
"clean:winbuild": "rmdir build /s /q & rmdir out /s /q"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#electron-forge/cli": "^6.0.0-beta.67",
"#electron-forge/maker-deb": "^6.0.0-beta.67",
"#electron-forge/maker-rpm": "^6.0.0-beta.67",
"#electron-forge/maker-squirrel": "^6.0.0-beta.67",
"#electron-forge/maker-zip": "^6.0.0-beta.67",
"concurrently": "^7.4.0",
"dotenv": "^16.0.3",
"electron": "^21.1.1",
"eslint": "^8.25.0",
"eslint-config-google": "^0.14.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.3.0",
"eslint-plugin-promise": "^6.1.0",
"eslint-plugin-react": "^7.31.10",
"wait-on": "^6.0.1"
},
"config": {
"forge": "./forge.config.js"
}
}
My forge.config.js:
module.exports = {
packagerConfig: {
ignore: [
/coverage.*/,
/node_modules.*/,
/public.*/,
/src.*/,
/\.env|\.gitignore|.*bak|eslint.*|package-lock.*|(?<!build.*)\.txt|(?<!build.*)\.md/
]
},
makers: [
{
name: '#electron-forge/maker-squirrel',
config: {
name: 'bkkgapp'
}
},
{
name: '#electron-forge/maker-zip'
}
]
}
when i'm trying to run "npm start" i'm getting this error message Port "1234" could not be used
enter image description here
see my packege.json
{
"name": "simplefolio",
"version": "1.0.1",
"private": "true",
"description": "A clean, beautiful and responsive portfolio template for Developers!",
"source": "src/index.html",
"scripts": {
"start": "parcel",
"build": "parcel build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/cobidev/simplefolio"
},
"keywords": [],
"author": "Jacobo Martinez",
"license": "ISC",
"bugs": {
"url": "https://github.com/cobidev/simplefolio/issues"
},
"homepage": "https://github.com/cobidev/simplefolio#readme",
"devDependencies": {
"#parcel/transformer-sass": "^2.0.1",
"parcel": "^2.0.1",
"prettier": "^2.4.1"
},
"dependencies": {
"#popperjs/core": "^2.10.2",
"bootstrap": "^5.1.3",
"jquery": "^3.6.0",
"popper.js": "^1.16.1",
"vanilla-tilt": "^1.7.2"
}
}
Do you have VLC running on your computer? It might be using that port: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
Can you try to use a different port?
Whenever I make a change to a file and save it as it should, Nodemon restarts but never gives me an output, instead of restarting for a long time.
This is the result i get
Here is my package.json file
{
"name": "Backend",
"version": "1.0.0",
"description": "",
"main": "Index.js",
"type": "module",
"scripts": {
"start": "nodemon index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"body-parser": "^1.19.1",
"cors": "^2.8.5",
"express": "^4.17.2",
"mongoose": "^6.1.6"
}
}
I've been looking for a solution to this on stackoverflow and tried a few things, but I'm not sure why the results aren't working.
I tried installing it globally with npm install -g nodemon, but it
still does not restart, instead displaying the same restarting
message for a long time.
npm install nodemon#2.0.2 -g
And I've tried adding the system path as suggested in a previous
answer to this question, but it's still not working.
site link - https://react-chat-page.netlify.app/
github - https://github.com/mrshawnhum/chat-app
I have recently added a redirect file to fix a bug when you refresh the site and I added automatic deploys with netlify-cli to my project. The first time I added Yarn Run Build and received an exit code 127 when attempting to deploy. I manually changed it on netlify to Yarn Build and still receive the same message. I also attempted to clear the cache and manually deploy the site and still receive the same message.
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.3.2",
"#testing-library/user-event": "^7.1.2",
"font-awesome": "^4.7.0",
"netlify-cli": "^2.58.0",
"query-string": "^6.13.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-emoji": "^0.5.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.1",
"react-scroll-to-bottom": "^3.0.0",
"socket.io-client": "^2.3.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"postbuild": "cp_redirects ./build/",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Netlify will start the build from the root folder of your git repo by default, which doesn't have your package.json file in it, and so Netlify doesn't know how to run yarn.
You can change that in the UI settings, see here.
I am trying to deploy deploy my parse server, parse server dashboard, etc to aws. I am sure that the problem that I am experiencing is quite simple and it has to do with how I am packaging my ab node apps. I am downloading the git repo and then uploading the zip to my eb instance. It is in turn giving me this error.
After downloading a repository, such as parse server, what do I need to do to put it on elastic bean stalk? I already have the parse server example running on aws. I am just trying to upgrade versions.
here is my package.JSON file
{
"name": "parse-server",
"version": "2.2.16",
"description": "An express module providing a Parse-compatible API server",
"main": "lib/index.js",
"repository": {
"type": "git",
"url": "https://github.com/ParsePlatform/parse-server"
},
"files": [
"bin/",
"src/",
"public_html/",
"views/",
"LICENSE",
"PATENTS",
"README.md"
],
"license": "BSD-3-Clause",
"dependencies": {
"babel-polyfill": "6.8.0",
"babel-runtime": "6.6.1",
"bcrypt-nodejs": "0.0.3",
"body-parser": "1.15.2",
"colors": "1.1.2",
"commander": "2.9.0",
"deepcopy": "0.6.3",
"express": "4.14.0",
"intersect": "1.0.1",
"lodash": "4.12.0",
"lru-cache": "4.0.1",
"mailgun-js": "0.7.10",
"mime": "1.3.4",
"mongodb": "2.1.18",
"multer": "1.1.0",
"parse": "1.9.0",
"parse-server-fs-adapter": "1.0.0",
"parse-server-push-adapter": "1.0.4",
"parse-server-s3-adapter": "1.0.4",
"parse-server-simple-mailgun-adapter": "1.0.0",
"pg-promise": "5.2.0",
"redis": "2.6.2",
"request": "2.73.0",
"request-promise": "4.0.1",
"semver": "^5.2.0",
"tv4": "1.2.7",
"winston": "2.2.0",
"winston-daily-rotate-file": "1.1.5",
"ws": "1.1.1"
},
"devDependencies": {
"babel-cli": "6.8.0",
"babel-core": "6.10.4",
"babel-istanbul": "0.11.0",
"babel-plugin-syntax-flow": "6.8.0",
"babel-plugin-transform-flow-strip-types": "6.8.0",
"babel-preset-es2015": "6.6.0",
"babel-preset-stage-0": "6.5.0",
"babel-register": "6.8.0",
"codecov": "1.0.1",
"cross-env": "2.0.0",
"deep-diff": "0.3.4",
"gaze": "1.1.0",
"jasmine": "2.4.1",
"mongodb-runner": "3.3.2",
"nodemon": "1.9.2"
},
"scripts": {
"dev": "npm run build && node bin/dev",
"build": "./node_modules/.bin/babel src/ -d lib/",
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 ./node_modules/.bin/mongodb-runner start",
"test": "cross-env NODE_ENV=test TESTING=1 ./node_modules/.bin/babel-node $COVERAGE_OPTION ./node_modules/jasmine/bin/jasmine.js",
"test:win": "npm run pretest && cross-env NODE_ENV=test TESTING=1 ./node_modules/.bin/babel-node ./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/** ./node_modules/jasmine/bin/jasmine.js && npm run posttest",
"posttest": "./node_modules/.bin/mongodb-runner stop",
"coverage": "cross-env COVERAGE_OPTION='./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/**' npm test",
"start": "node ./bin/parse-server",
"prepublish": "npm run build"
},
"engines": {
"node": ">=4.3"
},
"bin": {
"parse-server": "./bin/parse-server"
}
}
You have to physically go into the repository and compress it into a new zip file. For some reason it would not accept zip files that I downloaded off of github.