alsoscotland / react-super-select

MIT License
95 stars 33 forks source link

Readme is out of date #166

Open mildrenben opened 5 years ago

mildrenben commented 5 years ago

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?

alsoscotland commented 5 years ago

@mildrenben Apologies about the readme. Can you try

npm i
npm build
gulp dev
mildrenben commented 5 years ago

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! react-super-select@1.0.22 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 react-super-select@1.0.22 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! react-super-select@1.0.22 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 react-super-select@1.0.22 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:
alsoscotland commented 5 years ago

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

mildrenben commented 4 years ago

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?

alsoscotland commented 4 years ago

@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

mildrenben commented 4 years ago

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?

alsoscotland commented 4 years ago

@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.