Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build script fails on Windows #52

Open
gratrockstar opened this issue Nov 18, 2024 · 0 comments · May be fixed by #53
Open

Build script fails on Windows #52

gratrockstar opened this issue Nov 18, 2024 · 0 comments · May be fixed by #53
Assignees

Comments

@gratrockstar
Copy link
Contributor

The npm run build and npm run start commands fail on Windows, producing tons of errors. Here's an example, this error seems to be repeated for every scss file (here, ... is the path to the WP install):

ERROR in css/style
Module not found: Error: Can't resolve '.\assets\scss\_index.scss' in 'C:\...\wp-content\themes\wds-bt'
Did you mean './.\assets\scss\_index.scss'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
resolve '.\assets\scss\_index.scss' in 'C:\...\wp-content\themes\wds-bt'
  Parsed request is a module
  using description file: C:\...\wp-content\themes\wds-bt\package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      looking for modules in C:\...\wp-content\themes\wds-bt\node_modules
        single file module
          using description file: C:\...\wp-content\themes\wds-bt\package.json (relative path: ./node_modules/assets/scss/_index.scss)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\...\wp-content\themes\wds-bt\node_modules\assets\scss\_index.scss doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              C:\...\wp-content\themes\wds-bt\node_modules\assets\scss\_index.scss.jsx doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\...\wp-content\themes\wds-bt\node_modules\assets\scss\_index.scss.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              C:\...\wp-content\themes\wds-bt\node_modules\assets\scss\_index.scss.tsx doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\...\wp-content\themes\wds-bt\node_modules\assets\scss\_index.scss.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              C:\...\wp-content\themes\wds-bt\node_modules\assets\scss\_index.scss.json doesn't exist
            .wasm
              Field 'browser' doesn't contain a valid alias configuration
              C:\...\wp-content\themes\wds-bt\node_modules\assets\scss\_index.scss.wasm doesn't exist
        C:\...\wp-content\themes\wds-bt\node_modules\assets\scss\_index.scss doesn't exist
      C:\...\wp-content\themes\node_modules doesn't exist or is not a directory
      C:\...\wp-content\node_modules doesn't exist or is not a directory
      C:\...\node_modules doesn't exist or is not a directory
      ...
      C:\node_modules doesn't exist or is not a directory
@gratrockstar gratrockstar self-assigned this Nov 18, 2024
@gratrockstar gratrockstar linked a pull request Nov 18, 2024 that will close this issue
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant