TypeRocket / typerocket

TypeRocket is a highly integrated MVC WordPress framework with beautiful UI components for the modern developer.
https://typerocket.com
453 stars 62 forks source link

Adding custom js and css to typerocket 4 #148

Closed chibexme closed 5 years ago

chibexme commented 5 years ago

Hi All,

am trying to use npm to build my typerocket 4 project assets but it get stuck at 95% on the way and remains there till I kill the command with ctrl+c. I have tried creating fresh projects and updating npm but still cannot progress pass 95%. And adding css or js code to admin.js or admin.css files does not show any effect without npm successful build.

Please I need a guide if there is anything am missing.

Kind regards.

typerocket-npm-build

kevindees commented 5 years ago

Hey @chibexme

Are you still having this issue? Maybe you just needed to reboot? Can you post and NPM debug logs?

Thanks, Kevin

chibexme commented 5 years ago

Hi @kevindees, below is the current error message after upgrade my npm installation to v6.4.1 ` C:\xampp\htdocs\plugin-projects>yarn dev yarn run v1.12.3 $ npm run development

@ development C:\xampp\htdocs\plugin-projects cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

10% building modules 0/1 modules 1 active ...rocket\core\assets\sass\redactor.s 10% building modules 1/2 modules 1 active ...-archive\resources\assets\js\admin 10% building modules 2/3 modules 1 active ...dor\typerocket\core\assets\js\core 10% building modules 3/4 modules 1 active ...cket\core\assets\js\location.field 10% building modules 4/5 modules 1 active ...hive\resources\assets\sass\theme.s 10% building modules 5/6 modules 1 active ...hive\resources\assets\sass\admin.s 10% building modules 6/7 modules 1 active ...typerocket\core\assets\sass\core.s 10% building modules 7/8 modules 1 active ...rocket\core\assets\sass\redactor.s 10% building modules 8/9 modules 1 active ...hive\resources\assets\sass\theme.s 10% building modules 8/10 modules 2 active ...hive\resources\assets\sass\admin. 10% building modules 8/11 modules 3 active ...typerocket\core\assets\sass\core. 10% building modules 8/12 modules 4 active ...rocket\core\assets\sass\redactor. 10% building modules 8/13 modules 5 active ...modules\style-loader\lib\addStyle 11% building modules 9/13 modules 4 active ...modules\style-loader\lib\addStyle 11% building modules 10/13 modules 3 active ...modules\style-loader\lib\addStyl 11% building modules 11/13 modules 2 active ...rocket\core\assets\sass\redactor 11% building modules 11/14 modules 3 active ...de_modules\css-loader\lib\css-ba 11% building modules 12/14 modules 2 active ...rocket\core\assets\sass\redactor 11% building modules 12/15 modules 3 active ...node_modules\style-loader\lib\ur 11% building modules 13/15 modules 2 active ...rocket\core\assets\sass\redactor 11% building modules 14/15 modules 1 active ...typerocket\core\assets\sass\core 77% module and chunk tree optimization unnamed compat pluginC:\xampp\htdocs\plu gin-projects\node_modules\webpack\lib\Chunk.js:460 throw new Error( ^

Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Ent rypoint instead at Chunk.get (C:\xampp\htdocs\plugin-projects\node_module s\webpack\lib\Chunk.js:460:9) at C:\xampp\htdocs\plugin-projects\node_modules\laravel-m ix\node_modules\extract-text-webpack-plugin\dist\index.js:176:48 at Array.forEach () at C:\xampp\htdocs\plugin-projects\node_modules\laravel-m ix\node_modules\extract-text-webpack-plugin\dist\index.js:171:18 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\xampp\htdocs\plug in-projects\node_modules\webpack\node_modules\tapable\lib\Hoo kCodeFactory.js:32:10), :12:1) at AsyncSeriesHook.lazyCompileHook (C:\xampp\htdocs\plugin-projects\node_modules\webpack\node_modules\tapable\lib\Hook.js:154:20) at Compilation.seal (C:\xampp\htdocs\plugin-projects\node _modules\webpack\lib\Compilation.js:881:27) at hooks.make.callAsync.err (C:\xampp\htdocs\plugin-projects\node_modules\webpack\lib\Compiler.js:464:17) at _done (eval at create (C:\xampp\htdocs\plugin-projects\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anony mous>:9:1) at _err0 (eval at create (C:\xampp\htdocs\plugin-projects \node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anony mous>:20:22) at addModuleChain (C:\xampp\htdocs\plugin-projects\node modules\webpack\lib\Compilation.js:749:12) at processModuleDependencies.err (C:\xampp\htdocs\plugin-projects\node_modules\webpack\lib\Compilation.js:688:9) at process.internalTickCallback (internal/process/next_tick.js:70:11) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin /webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/we bpack.config.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ development script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\dev\AppData\Roaming\npm-cache_logs\2018-12-13T18_33_12 _355Z-debug.log error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm and.

Kindly help out. Thanks.

chibexme commented 5 years ago

@kevindees, kindly add this: mix.setPublicPath('wordpress'); to webpack.mix.js file. This issue delayed me on a project for 2 months.

Got this fix finally from: this link

Kind regards.