-
-
Notifications
You must be signed in to change notification settings - Fork 39
Issues/972 #982
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
base: main
Are you sure you want to change the base?
Issues/972 #982
Conversation
…d module validation in commands.ts
@1cbyc |
@1cbyc $ npx webpack
[webpack-cli] Failed to load '/home/shuhei/develop/vscode-extensions/vscode-blade-formatter7/webpack.config.js' config
[webpack-cli] /home/shuhei/develop/vscode-extensions/vscode-blade-formatter7/webpack.config.js:5
const __nodeExternals = require("webpack-node-externa
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Invalid or unexpected token
at wrapSafe (node:internal/modules/cjs/loader:1486:18)
at Module._compile (node:internal/modules/cjs/loader:1528:20)
at Object..js (node:internal/modules/cjs/loader:1706:10)
at Module.load (node:internal/modules/cjs/loader:1289:32)
at Function._load (node:internal/modules/cjs/loader:1108:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
at Module.require (node:internal/modules/cjs/loader:1311:12)
at require (node:internal/modules/helpers:136:16)
at WebpackCLI.tryRequireThenImport (/home/shuhei/develop/vscode-extensions/vscode-blade-formatter7/node_modules/webpack-cli/lib/webpack-cli.js:225:30)
|
thank you for pointing that out. i just checked. the import for
and push the update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have made the adjustments required.
@1cbyc Webpack compilation fixed but still some tests have failed. $ yarn run test
~~
1) Extension Test Suite
Should format file with runtime config / even if tailwind config has error:
AssertionError [ERR_ASSERTION]: '<div class="xxxl:col-end-8 col-start-2 col-end-11 md:col-end-12 xl:col-end-10">\n' +
' <h1 class="text-white">Random Stuff</h1>\n' +
'</div>\n' == '<div class="md:col-end-12 xl:col-end-10 col-start-2 col-end-11 xxxl:col-end-8">\n' +
' <h1 class="text-white">Random Stuff</h1>\n' +
'</div>\n'
+ expected - actual
-<div class="xxxl:col-end-8 col-start-2 col-end-11 md:col-end-12 xl:col-end-10">
+<div class="md:col-end-12 xl:col-end-10 col-start-2 col-end-11 xxxl:col-end-8">
<h1 class="text-white">Random Stuff</h1>
</div>
at /home/shuhei/develop/vscode-extensions/vscode-blade-formatter7/out/test/support/util.js:28:26
at Generator.next (<anonymous>)
at fulfilled (out/test/support/util.js:5:58)
2) Extension Test Suite
Should format file with runtime config / even if tailwind config has error (subdirectory) :
AssertionError [ERR_ASSERTION]: '<div class="xxxl:col-end-8 col-start-2 col-end-11 md:col-end-12 xl:col-end-10">\n' +
' <h1 class="text-white">Random Stuff</h1>\n' +
'</div>\n' == '<div class="md:col-end-12 xl:col-end-10 col-start-2 col-end-11 xxxl:col-end-8">\n' +
' <h1 class="text-white">Random Stuff</h1>\n' +
'</div>\n'
+ expected - actual
-<div class="xxxl:col-end-8 col-start-2 col-end-11 md:col-end-12 xl:col-end-10">
+<div class="md:col-end-12 xl:col-end-10 col-start-2 col-end-11 xxxl:col-end-8">
<h1 class="text-white">Random Stuff</h1>
</div>
|
thanks for checking this too, i think the test failures are due to the order of tailwind classes in the formatted output like xxxl:col-end-8 being placed at the start instead of the end. i'll look into whether this is caused by differences in the class sorting logic or environment. give me some time to review. |
hi, i have made all necessary corrections. please check. |
@1cbyc |
Description
This PR addresses critical module resolution issues that were causing "cannot find module" errors in the vscode-blade-formatter extension. The changes implement a comprehensive multi-strategy fallback system for module loading, enhanced error handling, and better debugging capabilities.
Key Changes:
Related Issue
I noticed someone raised this #972.
the "Fixes #972 - "cannot find module" errors and related module resolution problems."
Motivation and Context
The extension was experiencing module resolution failures in different VSCode environments due to:
These issues caused the extension to fail silently or crash when users had different VSCode configurations or when modules weren't available in expected locations.
How Has This Been Tested?
Testing Environment:
Testing Performed:
Test Results: