Open StevenDufresne opened 3 years ago
I need to test if this actually work on Windows...
I may be doing something wrong.
If the path to theme review action is D:/theme-review-action/
and my theme is in: D:\wordpress-develop\src\wp-content\themes\twentytwentyone
Then npm run start --pathToTheme=../wordpress-develop\src\wp-content\themes\twentytwentyone
nor he command with the double --
works.
-I think that --
duplication might have been a typo?
The error on Windows is still present:
× Copying theme files into the environment...
Error: Cannot copy '.' to a subdirectory of itself, 'D:\theme-review-action\test-theme'.
I may be doing something wrong.
If the path to theme review action is
D:/theme-review-action/
and my theme is in:D:\wordpress-develop\src\wp-content\themes\twentytwentyone
Then
npm run start --pathToTheme=../wordpress-develop\src\wp-content\themes\twentytwentyone
nor he command with the double--
works.-I think that
--
duplication might have been a typo?The error on Windows is still present:
× Copying theme files into the environment... Error: Cannot copy '.' to a subdirectory of itself, 'D:\theme-review-action\test-theme'.
The extra --
is necessary, it tells npm
to pass along the arguments, otherwise it doesn't.
Try:
npm run start -- --pathToTheme=..\wordpress-develop\src\wp-content\themes\twentytwentyone
I did already try with the extra --, the result is the same.
Log from today:
PS D:\theme-review-action> npm run start -- --pathToTheme=..\wordpress-develop\src\wp-content\themes\twentytwentyone
> wordpress-theme-check-action@1.4.11 start D:\theme-review-action
> node bin/program.js
Please ensure docker is running.
Test Version: 1.4.11
Testing Ports: 8484/8485
Steps:
× Copying theme files into the environment...
Error: Cannot copy '.' to a subdirectory of itself, 'D:\theme-review-action\test-theme'.
× Checking theme's basic structure
Error: Command failed with exit code 1: npm run check:structure
D:\theme-review-action\actions\structure-check\index.js:86
throw Error('Failed basic structure.');
^
Error: Failed basic structure.
at D:\theme-review-action\actions\structure-check\index.js:86:9
at Object.<anonymous> (D:\theme-review-action\actions\structure-check\index.js:90:3)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! WordPress-Theme-Check-Action@1.0.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the WordPress-Theme-Check-Action@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Carolina\AppData\Roaming\npm-cache\_logs\2021-07-13T03_21_40_475Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wordpress-theme-check-action@1.4.11 check:structure: `cd ./actions/structure-check && npm run start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wordpress-theme-check-action@1.4.11 check:structure 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\Carolina\AppData\Roaming\npm-cache\_logs\2021-07-13T03_21_40_605Z-debug.log
> wordpress-theme-check-action@1.4.11 check:structure D:\theme-review-action
> cd ./actions/structure-check && npm run start
> WordPress-Theme-Check-Action@1.0.0 start D:\theme-review-action\actions\structure-check
> node index.js
Running structure check.
Structure Check Errors:
The theme is required to have an index.php file.
The theme is required to have a style.css file.
The theme is required to have a screenshot.png or screenshot.jpg file.
I don't have the problem on my windows VM in both bash or powershell:
Can you make sure of the following:
I'm not sure if we need this to work on your machine seeing that the npm run {command} -- --prop
API is well documented and appears specific to your environment.
Except I am not the only person experiencing these errors. I had to recommend another tester to place the theme in the folder manually.
What are the minimum and or recommended versions of npm and node? I have not updated to npm 7 because as far as I know Gutenberg still does not work with 7. (And I still need the build to work for Gutenberg :) )
Except I am not the only person experiencing these errors. I had to recommend another tester to place the theme in the folder manually.
Yep, definitely agree with that but this PR itself is not platform-specific. The problems you are experiencing are part of the wider windows issue mentioned in #18.
What are the minimum and or recommended versions of npm and node? I'm not sure that we have that figured out yet. Can you share your npm and node versions?
npm -v
node -v
NPM 6.14.13 node v14.17.3
As mentioned in #50, it isn't clear what should be done with the
test-theme
folder.I think it's easier if we explicitly instruct users to pass in the path for now.
Fixes #50.