npm run build elifecycle

196
May 07, 2018, at 9:48 PM

I am new to react and i want to create production build out of my code. But when i run 'npm rub build' it gives me this error in .log file

0 info it worked if it ends with ok

1 verbose cli [ '/usr/local/Cellar/node/9.11.1/bin/node',

1 verbose cli '/usr/local/bin/npm',

1 verbose cli 'run',

1 verbose cli 'build' ]

2 info using npm@5.6.0

3 info using node@v9.11.1

4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]

5 info lifecycle jenna-web-frontend@0.1.0~prebuild: jenna-webfrontend@0.1.0

6 info lifecycle jenna-web-frontend@0.1.0~build: jenna-web-frontend@0.1.0

7 verbose lifecycle jenna-web-frontend@0.1.0~build: unsafe-perm in lifecycle true

8 verbose lifecycle jenna-web-frontend@0.1.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/markopetricic/Documents/Projects/staging-jenna-web-front/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

9 verbose lifecycle jenna-web-frontend@0.1.0~build: CWD: /Users/markopetricic/Documents/Projects/staging-jenna-web-front

10 silly lifecycle jenna-web-frontend@0.1.0~build: Args: [ '-c', 'react-scripts build' ]

11 silly lifecycle jenna-web-frontend@0.1.0~build: Returned: code: 1 signal: null

12 info lifecycle jenna-web-frontend@0.1.0~build: Failed to exec build script

13 verbose stack Error: jenna-web-frontend@0.1.0 build: react-scripts build

13 verbose stack Exit status 1

13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)

13 verbose stack at EventEmitter.emit (events.js:180:13)

13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)

13 verbose stack at ChildProcess.emit (events.js:180:13)

13 verbose stack at maybeClose (internal/child_process.js:936:16)

13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)

14 verbose pkgid jenna-web-frontend@0.1.0

15 verbose cwd /Users/markopetricic/Documents/Projects/staging-jenna-web-front

16 verbose Darwin 17.3.0

17 verbose argv "/usr/local/Cellar/node/9.11.1/bin/node" "/usr/local/bin/npm" "run" "build"

18 verbose node v9.11.1

19 verbose npm v5.6.0

20 error code ELIFECYCLE

21 error errno 1

22 error jenna-web-frontend@0.1.0 build: react-scripts build

22 error Exit status 1

23 error Failed at the jenna-web-frontend@0.1.0 build script.

23 error This is probably not a problem with npm. There is likely additional logging output above.

24 verbose exit [ 1, true ]

this is package.json

{
  "name": "jenna-web-frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "cookieconsent": "^3.0.6",
    "jquery": "^3.3.1",
    "react": "^16.3.0",
    "react-dom": "^16.3.0",
    "react-fade-in": "^0.1.5",
    "react-router-dom": "^4.2.2",
    "react-s3": "^1.2.4",
    "react-s3-uploader": "^4.8.0",
    "react-scripts": "1.1.1",
    "react-stay-scrolled": "^2.1.1",
    "sfcookies": "^1.0.2",
    "socket.io-client": "^2.1.0"
  },
  "scripts": {
    "start": "set PORT=3001 && react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

do you have any idea why this happened?

READ ALSO
TypeError: Cannot read property 'DataArea' of undefined

TypeError: Cannot read property 'DataArea' of undefined

I am trying to do a post call using node

119
Skip null or empty object to be assigned to an array in mongoose

Skip null or empty object to be assigned to an array in mongoose

In case of mongoose find() or findOne() returned value is [] and null respectively, if where conditions are not trueAnd this returned value is getting assigned to the array but I dont want it to happen

136
Convert any document, image, text file into PDF

Convert any document, image, text file into PDF

I want to convert any documents or image or text file into PDF for all the OS

160
How to call a schema from one model to another model in Mongoose

How to call a schema from one model to another model in Mongoose

I have defined a schema in one modelI want to use that schema in another module

104