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/
Related
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 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
I am trying to run npm with the command npm run start but I'm getting an error which seems to be happening when the webpack dev server tries to open:
> election#1.0.0 start C:\Users\Aristophanes\election_react\election_react-0.0.1
> webpack-dev-server --open
C:\Users\Aristophanes\election_react\election_react-0.0.1\node_modules\webpack-cli\bin\config-yargs.js:89
describe: optionsSchema.definitions.output.properties.path.description,
^
TypeError: Cannot read property 'properties' of undefined
at module.exports (C:\Users\Aristophanes\election_react\election_react-0.0.1\node_modules\webpack-cli\bin\config-yargs.js:89:48)
at Object.<anonymous> (C:\Users\Aristophanes\election_react\election_react-0.0.1\node_modules\webpack-dev-server\bin\webpack-dev-server.js:84:40)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! election#1.0.0 start: `webpack-dev-server --open`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the election#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I have run npm install -g webpack-dev-server as this has been the solution for similar errors, but the issue persists. Can anyone help? Thanks.
I am working on google firebase functions to generate thumbnails for images using imagemagic, I did exactly what is mentioned in this link
and also I have gone through this link.
I am getting the following exception while deploying using gcloud app deploy command. I have gone through other SO posts(link) which are similar to this issue.
I also have updated firebase tools using (npm install -g firebase-tools). is anything else I am missing ?
In the exception is says
at Object. (/app/lib/functions.js:43:47) at line number 43 the code snippet looks like this
exports.generateThumbnail = functions.storage.object().onChange(event => {
Exception looks as follows
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:
> nodejs-getting-started#1.0.0 start /app
> node app.js
/app/node_modules/firebase-functions/lib/config.js:51
throw new Error('Firebase config variables are not available. ' +
^
Error: Firebase config variables are not available. Please use the latest version of the Firebase CLI to deploy this function.
at init (/app/node_modules/firebase-functions/lib/config.js:51:15)
at Object.config (/app/node_modules/firebase-functions/lib/config.js:29:9)
at Object.object (/app/node_modules/firebase-functions/lib/providers/storage.js:41:27)
at Object.<anonymous> (/app/lib/functions.js:43:47)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/nodejs/bin/node" "/nodejs/bin/npm" "start"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! nodejs-getting-started#1.0.0 start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodejs-getting-started#1.0.0 start script 'node app.js'.
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 nodejs-getting-started package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs nodejs-getting-started
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls nodejs-getting-started
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /app/npm-debug.log
I'm building a NodeJS app using ExpressJS framework.
I'm trying to use monk to connect to MongoDB
var monk = require('monk');
var db = monk('localhost:3000/nodeauth');
When I do npm start , I'm getting the following error:
npm start
> jsblog#0.0.0 start /home/bytegeek/Codes/Expressprojects/jsblog
> node ./bin/www
/home/bytegeek/Codes/Expressprojects/jsblog/node_modules/mongoskin/lib/utils.js:33
var skinClassName = 'Skin' + NativeClass.name;
^
TypeError: Cannot read property 'name' of undefined
at makeSkinClass (/home/bytegeek/Codes/Expressprojects/jsblog/node_modules/mongoskin/lib/utils.js:33:43)
at Object.<anonymous> (/home/bytegeek/Codes/Expressprojects/jsblog/node_modules/mongoskin/lib/grid.js:6:35)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/home/bytegeek/Codes/Expressprojects/jsblog/node_modules/mongoskin/lib/db.js:22:16)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/home/bytegeek/Codes/Expressprojects/jsblog/node_modules/mongoskin/lib/mongo_client.js:5:14)
npm ERR! Linux 4.2.0-34-generic
npm ERR! argv "/opt/node-v5.7.1-linux-x64/bin/node" "/opt/node-v5.7.1-linux-x64/bin/npm" "start"
npm ERR! node v5.7.1
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! jsblog#0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jsblog#0.0.0 start script 'node ./bin/www'.
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 jsblog package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs jsblog
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls jsblog
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/bytegeek/Codes/Expressprojects/jsblog/npm-debug.log
I already have a MongoDB database nodeauth and also have some contents in it. mongod service is also running.
P.S: If I remove the above two lines of codes and do npm start , there is no error and I'm able to see the express welcome page at localhost:3000
Check your MongoDB port where it is running. if you did not change the default port , it should be http://localhost:27017/nodeauth
I think your app is running on 3000 port. so, check the mongod port and check again.
omit he port number for monk module. try this way.
var db = require('monk')('localhost/nodeauth');