ATFutures / geoplumber

Serve geographic data from R and consume with scalable front end.
https://atfutures.github.io/geoplumber/
59 stars 7 forks source link

npm build fails #48

Closed layik closed 5 years ago

layik commented 5 years ago

This is becoming an annoying issue.

Error:

./src/App.css
Module build failed: BrowserslistError: Unknown browser query `dead`
    at Array.forEach (<anonymous>)

In full:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using npm@6.4.1
3 info using node@v10.11.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle geoplumber@0.1.0~prebuild: geoplumber@0.1.0
...
10 silly lifecycle geoplumber@0.1.0~build: Args: [ '-c', 'react-scripts build' ]
11 silly lifecycle geoplumber@0.1.0~build: Returned: code: 1  signal: null
12 info lifecycle geoplumber@0.1.0~build: Failed to exec build script
13 verbose stack Error: geoplumber@0.1.0 build: `react-scripts build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid geoplumber@0.1.0
15 verbose cwd /tmp/geoplumber
16 verbose Linux 4.15.0-33-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v10.11.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error geoplumber@0.1.0 build: `react-scripts build`
22 error Exit status 1
23 error Failed at the geoplumber@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 ]

Cause: Removing the mentioned css file from the project DOES build.

Diagnosis: Not happening during npm start Happening across platforms

layik commented 5 years ago

Also happening if CRA is upgraded to 2.0

layik commented 5 years ago

https://github.com/browserslist/browserslist/issues/266

This should not be relevant to us, we are not using "bootstrap" npm package only the cdn package.

layik commented 5 years ago

Strange, with "clean" run of the front end direct from inst files builds. Almost there.

layik commented 5 years ago

1 full day later: npx create-react-app (CRA) creates a package.json with following without which CRA is not happy and gets created with our "semi automated" gp_build function.

  "browserslist": [
    ">0.2%",
    "not dead", <============ culprit
    "not ie <= 11",
    "not op_mini all"
  ]

we copy our package.json over it and when we run npm run build it does not like that not dead.

Is this nightmware over? :) next commit will tell.