Twill: Build scripts for windows

Created on 16 Aug 2018  Â·  20Comments  Â·  Source: area17/twill

Hi,
I tried to install twill but no success with build scripts in document, look like it works only in linux/macos, so i rewrote a little to make it works:

"cms-build": "npm run cms-copy-blocks && cd vendor/area17/twill && npm ci && npm run prod && cp -R public/* ${INIT_CWD}/public", "cms-copy-blocks": "npm run cms-clean-blocks && mkdir resources\\assets\\js\\blocks\\ && mkdir vendor\\area17\\twill\\frontend\\js\\components\\blocks\\customs\\ && cp -R resources\\assets\\js\\blocks\\ vendor\\area17\\twill\\frontend\\js\\components\\blocks\\customs\\", "cms-clean-blocks": "rm -rf vendor\\area17\\twill\\frontend\\js\\components\\blocks\\customs && rm -rf resources\\assets"

One more problem is paths in public/assets/tasks/icon.js, i saw you used path.resolve('frontend/icons') but i got the syntax is incorrect when build, and i changed it to path.resolve('frontend\icons') but still got same problem.

@ preicons D:laragonwwwlaratransvendorarea17twill rimraf public/assets/admin/icons/icons.svg && rimraf frontend/scss/setup/_icons.scss && rimraf public/assets/admin/icons/icons-files.svg && rimraf frontend/scss/setup/_icons-files.scss && mkdir -p public/assets/admin/icons

The syntax of the command is incorrect.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ preicons: rimraf public/assets/admin/icons/icons.svg && rimraf >frontend/scss/setup/_icons.scss && rimraf public/assets/admin/icons/icons-files.svg && >rimraf frontend/scss/setup/_icons-files.scss && mkdir -p public/assets/admin/icons
npm ERR! Exit status 1`

bug enhancement

Most helpful comment

Hi guys im on windows and i faced the same problems, but i got most of it working except the hot reload which i still didnt had enough time to debug/fix on my own... but the main issue on windows is that when u run npm run * it will by default use cmd.exe even if u run it from git bash or anything else....

so u need to instruct it to use bash.exe instead of cmd.exe you can do this by

npm run some-command --script-shell bash or by having a .npmrc with the following on the root of your project:

.npmrc

script-shell=bash

also the bash on windows is very weird sometimes.... this command specified on the documentation

"twill-copy-blocks": "npm run twill-clean-blocks && mkdir -p resources/assets/js/blocks/ && mkdir -p vendor/area17/twill/frontend/js/components/blocks/customs/ && cp -R resources/assets/js/blocks/ vendor/area17/twill/frontend/js/components/blocks/customs",

will work on mac, linux... but wont have the same behavior on bash on windows, the folder will be copied over blocks so u ended having /blocks/blocks, the following fixes it and also doesnt change the behavior on the other OS

-cp -R resources/assets/js/blocks/
+cp -R resources/assets/js/blocks/*

so perhaps updating the docs to /* by default would be a good idea.

also https://www.npmjs.com/package/windows-build-tools is a must on windows regardless of which project u are working on... things always tend to break without these tools...

All 20 comments

Hi @folkevil, thanks for sharing your experience on Windows.

Which shell were you using, Command Prompt or Powershell, something else?

windows 10 mamp 4 pro php 7.1.7
I cannot run the scripts too, either with CMD or GIT-BASH
npm run cms-copy-blocks

$ npm run cms-copy-blocks

> @ cms-copy-blocks D:\MAMP\htdocs\twill
> npm run cms-clean-blocks && mkdir -p resources/assets/js/blocks/ && mkdir -p vendor/area17/twill/frontend/js/components/blocks/customs/ && cp -R resources/assets/js/blocks/ vendor/area17/twill/frontend/js/components/blocks/customs/


> @ cms-clean-blocks D:\MAMP\htdocs\twill
> rm -rf vendor/area17/twill/frontend/js/components/blocks/customs/*

La syntaxe de la commande n'est pas correcte.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ cms-copy-blocks: `npm run cms-clean-blocks && mkdir -p resources/assets/js/blocks/ && mkdir -p vendor/area17/twill/frontend/js/components/blocks/customs/ && cp -R resources/assets/js/blocks/ vendor/area17/twill/frontend/js/components/blocks/customs/`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ cms-copy-blocks 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!     C:\Users\xxxxxxxxxx\AppData\Roaming\npm-cache\_logs\2018-08-26T06_08_59_781Z-debug.log

then if I remove the copy part
and execute npm run cms-build

$ npm run cms-build

> @ cms-build D:\MAMP\htdocs\twill
>  cd vendor/area17/twill && npm ci && npm run prod && cp -R public/ ${INIT_CWD}/


> [email protected] install D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\fsevents
> node install


> [email protected] postinstall D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\webpack\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js


> [email protected] install D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.3/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.3/win32-x64-64_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> [email protected] postinstall D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass
> node scripts/build.js

Building: D:\nodejs\node.exe D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'D:\\nodejs\\node.exe',
gyp verb cli   'D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:149:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:149:21)
gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError (D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\which\\which.js:13:12)\n    at F (D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\which\\which.js:68:19)\n    at E (D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\which\\which.js:80:29)\n    at D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\which\\which.js:89:16\n    at D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\isexe\\index.js:42:5\n    at D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:149:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python D:\MAMP\bin\python\bin\python.EXE
gyp verb check python version `D:\MAMP\bin\python\bin\python.EXE -c "import platform; print(platform.python_version());"` returned: "2.7.6\r\n"
gyp verb get node dir no --target version specified, falling back to host node version: 10.0.0
gyp verb command install [ '10.0.0' ]
gyp verb install input version string "10.0.0"
gyp verb install installing version: 10.0.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 10.0.0
gyp verb build dir attempting to create "build" dir: D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass\build
gyp verb Not using VS2017: Could not use PowerShell to find VS2017
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass\build\config.gypi
gyp verb config.gypi checking for gypi file: D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass\config.gypi
gyp verb common.gypi checking for gypi file: D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn D:\MAMP\bin\python\bin\python.EXE
gyp info spawn args [ 'D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\node-sass\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\noel\\.node-gyp\\10.0.0\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\noel\\.node-gyp\\10.0.0',
gyp info spawn args   '-Dnode_gyp_dir=D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\noel\\.node-gyp\\10.0.0\\<(target_arch)\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\node-sass',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\node-sass\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir C:\Users\noel\.node-gyp\10.0.0
gyp verb found first Solution file build/binding.sln
gyp verb could not find "msbuild.exe" in PATH - finding location in registry
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
Gâ–’nâ–’ration des projets individuellement dans cette solution. Pour activer la gâ–’nâ–’ration en parallâ–’le, ajoutez le commutateur "/m".
La gâ–’nâ–’ration a dâ–’marrâ–’ 26/08/2018 08:03:39.
Projet "D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass\build\binding.sln" sur le noud 1 (cibles par dâ–’faut).
ValidateSolutionConfiguration:
  Gâ–’nâ–’ration de la configuration de solution "Release|x64".
MSBUILD : error MSB3428: Impossible de charger le composant Visualâ–’C++ "VCBuild.exe". Pour corriger le problâ–’me, vous devez 1) installer le Kit de dâ–’veloppement .NET Frameworkâ–’2.0â–’SDK, 2) installer Microsoft Visual Studioâ–’2005 ou 3) ajouter l'emplacement du composant au chemin d'accâ–’s systâ–’me, s'il est installâ–’ ailleurs.  [D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass\build\binding.sln]
Gâ–’nâ–’ration du projet "D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass\build\binding.sln" terminâ–’e (cibles par dâ–’faut) -- â–’CHEC.

â–’CHEC de la build.

"D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass\build\binding.sln" (cible par dâ–’faut) (1) ->
(_src_\libsass cible) ->
  MSBUILD : error MSB3428: Impossible de charger le composant Visualâ–’C++ "VCBuild.exe". Pour corriger le problâ–’me, vous devez 1) installer le Kit de dâ–’veloppement .NET Frameworkâ–’2.0â–’SDK, 2) installer Microsoft Visual Studioâ–’2005 ou 3) ajouter l'emplacement du composant au chemin d'accâ–’s systâ–’me, s'il est installâ–’ ailleurs.  [D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass\build\binding.sln]

    0 Avertissement(s)
    1 Erreur(s)

Temps â–’coulâ–’ 00:00:01.25
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "D:\\nodejs\\node.exe" "D:\\MAMP\\htdocs\\twill\\vendor\\area17\\twill\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\MAMP\htdocs\twill\vendor\area17\twill\node_modules\node-sass
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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!     C:\Users\noel\AppData\Roaming\npm-cache\_logs\2018-08-26T06_03_41_358Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ cms-build: ` cd vendor/area17/twill && npm ci && npm run prod && cp -R public/ ${INIT_CWD}/`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ cms-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:
npm ERR!     C:\Users\xxxxxxxxxx\AppData\Roaming\npm-cache\_logs\2018-08-26T06_03_41_788Z-debug.log

at the moment the installation experience is not very good
why do we need msbuild.exe ? npm runs well with other laravel projecst and my pc....
1) there were problems with the json into the migration files.... I needed to replace with text->nullable()...
2) which file and in which directory do we need to create the navigation concent ?
see https://twill.io/docs/#navigation
3) a simple installation video with creation of a module would be a good idea
4) I still hope I will be able to see &nd play with twill on my pc !
thks for your support

Hi @khyoz,

msbuild.exe is not required by Twill itself. You need build tools on your machine to be able to compile native Node modules, which Laravel Mix includes. Checkout the Windows Build Tools package on NPM.

Regarding problems in the migrations files, I assume your database does not support JSON columns.

Navigation configuration goes into config/twill-navigation.php.

Tutorial videos are definitely on our short term roadmap, stay tuned!

Thank you so much for your enthusiasm in trying out Twill.

Thanks for the answer, I have installed now msbuild.exe now, but still the scripts (@ cms-copy-blocks ...) don't work. Ang yes for the moment, I don't have mysql5.7 so json is not supported, but that is not really the problem..But I don't know why I need this tool as laravel-mix is running perfectly with other Laravel and VueJs projecs in Windows.... So I will try again in some time, and continue to follow your progress on this very interesting project.

updating with twill v1.2 : still same problem ...is there a problem in the script ? (W10, Mamp4 pro)
Am I the only one who have problems with Windows 10 ? not sure about the error , but it seems there is a variable INIT_CWD that seems to be strange in the log, maybe unknown ?
v1 2_windows_10_mamp4

Hello @khyoz,

Sorry to hear you're still encountering these issues. Sadly is hard to test across all the environments and configurations.

I'm using Windows 10 but not natively, instead using Windows Subsystem for Linux (WSL) which can be enabled on Windows 10 Pro.

We have discussed with @ifox to simplify these commands by using php -r oneliners or similar to remove the need to use bash-specific commands.

A quick workaround will be to edit package.json and change the script part that uses cp and INIT_CWD and use relative paths instead, something like (completely untested):

"twill-build": "npm run twill-copy-blocks && cd vendor/area17/twill && npm ci && npm run prod && xcopy /E /Y public/*.* ../../../public",

I'm going to setup a Windows native installation next week and will be able to introduce changes to improve this.

Hope the quick hack works on your end and stay tuned for updates.

Thank you for your patience and interest in Twill.

Cheers.

Hi @luislavena any feedback about your installation and tests for windows ?

no solution for windows ???

Hello @khyoz, sadly, no easy solution. Did you try introduce the change I made?

The issue is caused by the nature of the commands being executed, as mentioned here (the last part of the comment) the embedded commands fail.

The only workaround we are thinking of is to replace that one-liners with an artisan task, but need to regroup internally on the fix.

Will keep you informed on this.

Cheers.

Hi guys im on windows and i faced the same problems, but i got most of it working except the hot reload which i still didnt had enough time to debug/fix on my own... but the main issue on windows is that when u run npm run * it will by default use cmd.exe even if u run it from git bash or anything else....

so u need to instruct it to use bash.exe instead of cmd.exe you can do this by

npm run some-command --script-shell bash or by having a .npmrc with the following on the root of your project:

.npmrc

script-shell=bash

also the bash on windows is very weird sometimes.... this command specified on the documentation

"twill-copy-blocks": "npm run twill-clean-blocks && mkdir -p resources/assets/js/blocks/ && mkdir -p vendor/area17/twill/frontend/js/components/blocks/customs/ && cp -R resources/assets/js/blocks/ vendor/area17/twill/frontend/js/components/blocks/customs",

will work on mac, linux... but wont have the same behavior on bash on windows, the folder will be copied over blocks so u ended having /blocks/blocks, the following fixes it and also doesnt change the behavior on the other OS

-cp -R resources/assets/js/blocks/
+cp -R resources/assets/js/blocks/*

so perhaps updating the docs to /* by default would be a good idea.

also https://www.npmjs.com/package/windows-build-tools is a must on windows regardless of which project u are working on... things always tend to break without these tools...

On win 8.1 with Git Bash, npm run twill-build fails as other users above have described.

The solution by @milewski compiles successfully
npm run twill-build --script-shell bash

command from @Maximus1000 (so thks to @milewski as well) is running for me 👍 I can access the admin panel now

Based on anwsers from @milewski and @luislavena: this works on win 10:

"twill-build": "npm run twill-copy-blocks && cd vendor/area17/twill && npm ci && npm run prod && cp -R public/* ../../../public",
"twill-copy-blocks": "npm run twill-clean-blocks && mkdir -p resources/assets/js/blocks/ && mkdir -p vendor/area17/twill/frontend/js/components/blocks/customs/ && cp -R resources/assets/js/blocks/* vendor/area17/twill/frontend/js/components/blocks/customs",
"twill-clean-blocks": "rm -rf vendor/area17/twill/frontend/js/components/blocks/customs/*",

Run with npm run twill-build --script-shell bash


I also had problem with bash complaining about npm not being found, so I will just add this here as using bash seems to be the only solution in this case. Also it might be useful to know that 'bash' in this case is windows bash (as part of windows linux subsystem) and not Git Bash. I found the easiest solution to missing npm is to install node and npm again in bash:

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

@zipavlin solutions works, but it would be good, if we have a working install script from the start. Maybe https://github.com/kentcdodds/cross-env can fix the issue with the {INIT_CWD} command?

I am also on Windows 10 and using Laragon, the best - and fastest - local server by far

I tried to use all in this thread, but nothing helps me =(

In addition to @milewski suggestion, I had to also upgrade node and npm, then it worked. I was previously on node v8.x and npm v5.6. I upgraded to node 10.15.2 and npm 6.4.0.

On win 8.1 with Git Bash, npm run twill-build fails as other users above have described.

The solution by @milewski compiles successfully
npm run twill-build --script-shell bash

That's brilliant. Works on win10 too.

Added a tip to the docs about using --script-shell bash. Closing this as this is more of an npm usage issue depending on environment configuration than a Twill "bug".

A way to fix it though is including this and just run without --script-shell bash.

"twill-build": "npm run twill-build-fix --script-shell bash",
"twill-build-fix": "rm -f public/hot && npm run twill-copy-blocks && cd vendor/area17/twill && npm ci && npm run prod && cp -R public/* ${INIT_CWD}/public",
"twill-copy-blocks": "npm run twill-copy-blocks-fix --script-shell bash",
"twill-copy-blocks-fix": "npm run twill-clean-blocks && mkdir -p resources/assets/js/blocks/ && cp -R resources/assets/js/blocks/ vendor/area17/twill/frontend/js/components/blocks/customs/",
"twill-clean-blocks": "npm run twill-clean-blocks-fix --script-shell bash",
"twill-clean-blocks-fix": "rm -rf vendor/area17/twill/frontend/js/components/blocks/customs"

A way to fix it though is including this and just run without --script-shell bash.

"twill-build": "npm run twill-build-fix --script-shell bash",
"twill-build-fix": "rm -f public/hot && npm run twill-copy-blocks && cd vendor/area17/twill && npm ci && npm run prod && cp -R public/* ${INIT_CWD}/public",
"twill-copy-blocks": "npm run twill-copy-blocks-fix --script-shell bash",
"twill-copy-blocks-fix": "npm run twill-clean-blocks && mkdir -p resources/assets/js/blocks/ && cp -R resources/assets/js/blocks/ vendor/area17/twill/frontend/js/components/blocks/customs/",
"twill-clean-blocks": "npm run twill-clean-blocks-fix --script-shell bash",
"twill-clean-blocks-fix": "rm -rf vendor/area17/twill/frontend/js/components/blocks/customs"

Can we PR this change?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lostdesign picture lostdesign  Â·  5Comments

layout-lab picture layout-lab  Â·  5Comments

madsem picture madsem  Â·  4Comments

vacoup95 picture vacoup95  Â·  3Comments

zipavlin picture zipavlin  Â·  3Comments