react-super-select icon indicating copy to clipboard operation
react-super-select copied to clipboard

Readme is out of date

Open mildrenben opened this issue 5 years ago • 7 comments

Cannot build locally, trying to make sense of the gulp tasks but it's quite hard to understand without docs.

The docs call for:

npm i
gulp build
gulp dev

But gulp build is not a task. I tried gulp build:docs-gulp-sequence and that throws an error.

Are the docs out of date? How do I get this running locally?

mildrenben avatar Sep 27 '19 10:09 mildrenben

@mildrenben Apologies about the readme. Can you try

npm i
npm build
gulp dev

alsoscotland avatar Sep 27 '19 14:09 alsoscotland

Damn I tried this also, tried again to make sure but npm run build fails too

tmp/version_tmp: No such file or directory

[16:39:34] 'docs_add_version' errored after 11 ms
[16:39:34] Error: Command failed: echo "var RSS_VERSION = \"1.0.22\";"|cat - ./scripts/support/version-printer-base.txt > ./tmp/version_tmp && mv ./tmp/version_tmp ./src_docs/version-printer.js
/bin/sh: ./tmp/version_tmp: No such file or directory

    at ChildProcess.exithandler (child_process.js:291:12)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:961:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
[16:39:34] 'build:docs-gulp-sequence' errored after 482 ms
[16:39:34] Error in plugin 'run-sequence(docs_add_version)'
Message:
    Command failed: echo "var RSS_VERSION = \"1.0.22\";"|cat - ./scripts/support/version-printer-base.txt > ./tmp/version_tmp && mv ./tmp/version_tmp ./src_docs/version-printer.js
/bin/sh: ./tmp/version_tmp: No such file or directory

Details:
    killed: false
    code: 1
    signal: null
    cmd: echo "var RSS_VERSION = \"1.0.22\";"|cat - ./scripts/support/version-printer-base.txt > ./tmp/version_tmp && mv ./tmp/version_tmp ./src_docs/version-printer.js
Stack:
Error: Command failed: echo "var RSS_VERSION = \"1.0.22\";"|cat - ./scripts/support/version-printer-base.txt > ./tmp/version_tmp && mv ./tmp/version_tmp ./src_docs/version-printer.js
/bin/sh: ./tmp/version_tmp: No such file or directory

    at ChildProcess.exithandler (child_process.js:291:12)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:961:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] docs:build-sequence: `npm run docs:clean && $(npm bin)/gulp build:docs-gulp-sequence`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] docs:build-sequence 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/Ben/.npm/_logs/2019-09-27T15_39_34_746Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `npm run clean && npm run npm:build:css && npm run npm:babel:js && npm run docs:build-sequence`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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:

mildrenben avatar Sep 27 '19 15:09 mildrenben

possibly try manually creating a /tmp directory first? mkdir tmp Apologies... I wrote this project a couple of years ago and the build/gulp setup likely needs some attention at this point

alsoscotland avatar Sep 27 '19 15:09 alsoscotland

Hey @alsoscotland – I've gone through and fixed a number of documentation issues and updated some of the processes so that it works now 👍

The reason I was doing this is so I could make the switch from lodash to lodash-es, which is tree-shakeable and lowers bundle sizes.

When switching to lodash-es, the build process broke and I cannot figure out why or how to fix it. The error when running npm run build references not allowing imports/exports:

ParseError: 'import' and 'export' may appear only with 'sourceType: module'

This is especially strange as it allows import/export on the rss react component, but not when we switch to lodash-es which itself uses import/export (previously lodash used require)

Repository here: https://github.com/mildrenben/react-super-select

Any idea on how to get over this final hurdle?

mildrenben avatar Oct 01 '19 12:10 mildrenben

@mildrenben Give this a shot https://github.com/alsoscotland/react-super-select/tree/v1.0.23 I have added the es2015 plugin to babelify for the docs processing. That may help

alsoscotland avatar Oct 02 '19 01:10 alsoscotland

Unfortunately I'd tried that before and it doesn't fix the issue.

Any chance you could pull my repo down and take a look please?

mildrenben avatar Oct 02 '19 09:10 mildrenben

@mildrenben I looked at this for a couple hours. Something about lodash-es and browserify are not playing well together. I attempted to update to latest babel and move to gulp-bro but still was seeing the issue even with the latest dependencies. This Component is badly in need of updating but unfortunately I do not have the bandwidth at the moment to do so.

alsoscotland avatar Oct 02 '19 14:10 alsoscotland