I have installed the parse server and it runs the single command post/put correctly.
However, after I added the express.js framework, I used “npm start – /var/www/parse_server/config.json” to run the server.
Then, I got the following errors.
How do I install the missing modules? Thanks
(1to1call) Tom:parse_server mariolzx$ npm start -- /var/www/parse_server/config.json
> parse-server#4.5.0 start /private/var/www/parse_server/parse_server
> node ./bin/parse-server "/var/www/parse_server/config.json"
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module '/var/www/parse_server/config.json'
Require stack:
- /private/var/www/parse_server/parse_server/lib/cli/utils/commander.js
- /private/var/www/parse_server/parse_server/lib/cli/utils/runner.js
- /private/var/www/parse_server/parse_server/lib/cli/parse-server.js
- /private/var/www/parse_server/parse_server/bin/parse-server
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at parseConfigFile (/private/var/www/parse_server/parse_server/lib/cli/utils/commander.js:93:24)
at Command._commander.Command.parse (/private/var/www/parse_server/parse_server/lib/cli/utils/commander.js:139:20)
at _default (/private/var/www/parse_server/parse_server/lib/cli/utils/runner.js:57:22)
at Object.<anonymous> (/private/var/www/parse_server/parse_server/lib/cli/parse-server.js:38:21)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/private/var/www/parse_server/parse_server/lib/cli/utils/commander.js',
'/private/var/www/parse_server/parse_server/lib/cli/utils/runner.js',
'/private/var/www/parse_server/parse_server/lib/cli/parse-server.js',
'/private/var/www/parse_server/parse_server/bin/parse-server'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! parse-server#4.5.0 start: `node ./bin/parse-server "/var/www/parse_server/config.json"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the parse-server#4.5.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/mariolzx/.npm/_logs/2021-02-28T01_57_37_051Z-debug.log
(1to1call) Tom:parse_server mariolzx$ npm start -- /var/www/parse_server/config.json
Related
My express.js is unable to start upon typing npm start and I don't understand why it's happening, here's my error log:
C:\Users\simer\Desktop\API-workshop>npm start
> api-workshop#0.0.0 start C:\Users\simer\Desktop\API-workshop
> node ./bin/www
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module 'http-errors'
Require stack:
- C:\Users\simer\Desktop\API-workshop\app.js
- C:\Users\simer\Desktop\API-workshop\bin\www
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (C:\Users\simer\Desktop\API-workshop\app.js:1:19)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\simer\\Desktop\\API-workshop\\app.js',
'C:\\Users\\simer\\Desktop\\API-workshop\\bin\\www'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! api-workshop#0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the api-workshop#0.0.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\simer\AppData\Roaming\npm-cache\_logs\2022-01-19T21_07_47_160Z-debug.log
Does anyone know what I should do?
You need to install Your package - http-errors in root project directory.
npm install http-errors
Try to run again npm start
I am trying to use npm run build and I am unable to run is as I am being told that \node_modules\tablemark\dist\index.js is not found. The error is as follows:
> node .
internal/modules/cjs/loader.js:456
throw e;
^
Error: Cannot find module 'D:\Avin Dev\dev-hearts\node_modules\tablemark\dist\index.js'
at createEsmNotFoundErr (internal/modules/cjs/loader.js:929:15)
at finalizeEsmResolution (internal/modules/cjs/loader.js:922:15)
at resolveExports (internal/modules/cjs/loader.js:450:14)
at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (D:\Avin Dev\dev-hearts\index.js:3:19)
at Module._compile (internal/modules/cjs/loader.js:1085:14) {
code: 'MODULE_NOT_FOUND',
path: 'D:\\Avin Dev\\dev-hearts\\node_modules\\tablemark\\package.json'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hearts#1.0.0 build: `node .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hearts#1.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! C:\Users\avini\AppData\Roaming\npm-cache\_logs\2021-11-08T07_10_51_261Z-debug.log
So far I have tried:
Completely reinstalling npm.
Installing tablemark separately using npm install tablemark
My NPM version is: 6.14.15 and my Node version is v14.18.1
I'm trying to run the server on the back-end of a project I'm doing and I keep getting this error message and it stops the server from running. I installed express generator if that makes any difference
> server#0.0.0 start /Users/username/Desktop/project/server
> node ./bin/www
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module 'http-errors'
Require stack:
- /Users/username/Desktop/project/server/main/app.js
- /Users/username/Desktop/project/server/bin/www
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:747:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/username/Desktop/project/server/main/app.js:1:19)
at Module._compile (internal/modules/cjs/loader.js:1085:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:791:14)
at Module.require (internal/modules/cjs/loader.js:974:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/username/Desktop/project/server/main/app.js',
'/Users/username/Desktop/project/server/bin/www'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! server#0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the server#0.0.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/username/.npm/_logs/2020-11-13T03_27_43_635Z-debug.log
It clearly says Error: Cannot find module 'http-errors', so you probably don't have the package installed locally. Run npm i http-errors to download it.
Alternatively, if you'd like to save the package as a dependency in your project, run npm i http-errors --save
This is the error message after I finished installation of Prop-Types Validation in my create-react-app
> burgerapp#0.1.0 start C:\Users\ajeet\Desktop\burgerapp
> node scripts/start.js
module.js:540
throw err;
^
Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\ajeet\Desktop\burgerapp\scripts\start.js:19:17)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! burgerapp#0.1.0 start: `node scripts/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the burgerapp#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\ajeet\AppData\Roaming\npm-cache\_logs\2018-02-04T23_43_08_160Z-debug.log
Please help me to find solution. Thank you for your help.
this just sometimes happens with npm when adding packages, especially with create-react-app projects. Delete node_modules and run npm install again, that should fix it.
You can install webpack by using command 'npm install webpack --dev'.
I cloned create-react-library from https://github.com/UdiliaInc/create-react-library but cannot get it to start.
I have made no edits. I ran npm install and then npm start. When I run npm start I get the same error described in the below post.
Nodejs npm scripts fail with "SyntaxError: Unexpected token {"
I checked my node version and it is 5.3.0. Any other reasons why this could be happening?
The error is
`[clynch#localhost create-react-library]$ npm start
create-react-library#1.0.0 start /home/clynch/git/create-react-library
node scripts/start.js
/home/clynch/git/create-react-library/scripts/start.js:23
const { choosePort,
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:430:10)
at startup (node.js:141:18)
at node.js:980:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! create-react-library#1.0.0 start: `node scripts/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the create-react-library#1.0.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! /home/clynch/.npm/_logs/2017-11-16T21_05_24_465Z-debug.log
`
You should update your node version to 6.12 or 7+
For reference, check http://node.green/