uptick / react-keyed-file-browser

Folder based file browser given a flat keyed list of objects, powered by React.
MIT License
301 stars 144 forks source link

Unable to generate 'react-keyed-file-browser.js' in 'dist' dir even though npm-build is successful by 'npm prepublish' or 'npm run build' command #57

Closed girijant closed 5 years ago

girijant commented 5 years ago

Step-1: As I've Windows-10 OS, so modified only the 'scripts' section(build-js, build-css, build) of the 'package.json' as below in order to make the npm-build successful:

"scripts": {
    "publish-demo": "git branch -D gh-pages; git push origin --delete gh-pages; git checkout -b gh-pages; cd demo-site; yarn; npm run build; cd ..; git add .; git add -f demo-site/dist; git add -f demo-site/node_modules/uptick-demo-site/dist; git commit -m \"Demo site build\"; git push origin gh-pages; git checkout master; git push origin `git subtree split --prefix demo-site gh-pages`:gh-pages --force;",
    "test": "echo \"Error: no test specified\" && exit 1",
    "build-js": "node .//node_modules//webpack//bin//webpack.js",
    "build-css": "node .//node_modules//node-sass//bin//node-sass src//browser.sass dist//react-keyed-file-browser.css",
    "build": "npm run build-js && npm run build-css",
    "prepublish": "npm run build",
    "storybook": "start-storybook -p 9001 -c .storybook"
  },

Step-2: Executed 'npm install' or 'npm prepublish' or 'npm run build' to build the project, build is successful, 'dist' directory is created with 'react-keyed-file-browser.css' file. Not seeing the 'react-keyed-file-browser.js' file from the 'dist' dir.

Here is my build-logs after executing 'npm prepublish' command from the console:

D:\React-Workspace\react-keyed-file-browser-master>npm run prepublish
> react-keyed-file-browser@1.4.3 prepublish D:\React-Workspace\react-keyed-file-browser-master
> npm run build

> react-keyed-file-browser@1.4.3 build D:\React-Workspace\react-keyed-file-browser-master
> npm run build-js && npm run build-css

> react-keyed-file-browser@1.4.3 build-js D:\React-Workspace\react-keyed-file-browser-master
> node .//node_modules//webpack//bin//webpack.js

Hash: 39059271932552f3ef32
Version: webpack 4.29.6
Time: 3868ms
Built at: 03/21/2019 10:15:48 PM
                      Asset      Size  Chunks             Chunk Names
react-keyed-file-browser.js  56.2 KiB       0  [emitted]  main
Entrypoint main = react-keyed-file-browser.js
[0] external "react" 42 bytes {0} [built]
[1] external "prop-types" 42 bytes {0} [built]
[2] external "moment" 42 bytes {0} [built]
[3] external "react-dnd" 42 bytes {0} [built]
[4] external "react-dnd-html5-backend" 42 bytes {0} [built]
[5] external "classnames" 42 bytes {0} [built]
[6] ./src/index.js + 29 modules 109 KiB {0} [built]
    | ./src/index.js 768 bytes [built]
    | ./src/details/index.js 67 bytes [built]
    | ./src/filters/index.js 67 bytes [built]
    | ./src/base-file.js 9.22 KiB [built]
    | ./src/headers/index.js 61 bytes [built]
    | ./src/files/index.js 300 bytes [built]
    | ./src/base-folder.js 8.66 KiB [built]
    | ./src/folders/index.js 225 bytes [built]
    | ./src/groupers/index.js 150 bytes [built]
    | ./src/sorters/index.js 124 bytes [built]
    | ./src/browser.js 29.4 KiB [built]
    | ./src/icons/index.js 81 bytes [built]
    | ./src/details/default.js 3.68 KiB [built]
    | ./src/filters/default.js 3.79 KiB [built]
    | ./src/constants.js 1.9 KiB [built]
    |     + 15 hidden modules

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/

> react-keyed-file-browser@1.4.3 build-css D:\React-Workspace\react-keyed-file-browser-master
> node .//node_modules//node-sass//bin//node-sass src//browser.sass dist//react-keyed-file-browser.css

Rendering Complete, saving .css file...
Wrote CSS to D:\React-Workspace\react-keyed-file-browser-master\dist\react-keyed-file-browser.css

D:\React-Workspace\react-keyed-file-browser-master>

If any mistake or additional configuration is required to generate the 'react-keyed-file-browser.js' in the 'dist' dir, please let me know.

Many Thanks, ~Girija

jlo-1 commented 5 years ago

Hi thanks for reporting! The package just had a webpack upgrade in which i set the webpack output path incorrectly. See here for resolution https://github.com/uptick/react-keyed-file-browser/commit/b1961342c87544ee70a02db3dc4943142880807a Closing the issue, please reopen if you don't see react-keyed-file-browser.js in the dist folder after running npm run build or npm prepublish