You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.
npm run build would generate blocks.build.js and that's it.
Actual Behavior
An error is thrown because the CSS file(s) don't exist.
Let's build and compile the files...
✅ Built successfully!
fs.js:115
throw err;
^
Error: ENOENT: no such file or directory, open '/mnt/c/work/wpdev/syntaxhighlighter/wordpress/wp-content/plugins/syntaxhighlighter/dist/blocks.editor.build.css'
at Object.openSync (fs.js:436:3)
at Object.readFileSync (fs.js:341:35)
at getFileSize (/mnt/c/work/wpdev/syntaxhighlighter/wordpress/wp-content/plugins/syntaxhighlighter/node_modules/cgb-scripts/scripts/build.js:50:37)
at compiler.run (/mnt/c/work/wpdev/syntaxhighlighter/wordpress/wp-content/plugins/syntaxhighlighter/node_modules/cgb-scripts/scripts/build.js:124:4)
at emitRecords.err (/mnt/c/work/wpdev/syntaxhighlighter/wordpress/wp-content/plugins/syntaxhighlighter/node_modules/webpack/lib/Compiler.js:265:13)
at Compiler.emitRecords (/mnt/c/work/wpdev/syntaxhighlighter/wordpress/wp-content/plugins/syntaxhighlighter/node_modules/webpack/lib/Compiler.js:371:38)
at emitAssets.err (/mnt/c/work/wpdev/syntaxhighlighter/wordpress/wp-content/plugins/syntaxhighlighter/node_modules/webpack/lib/Compiler.js:258:10)
at applyPluginsAsyncSeries1.err (/mnt/c/work/wpdev/syntaxhighlighter/wordpress/wp-content/plugins/syntaxhighlighter/node_modules/webpack/lib/Compiler.js:364:12)
at next (/mnt/c/work/wpdev/syntaxhighlighter/wordpress/wp-content/plugins/syntaxhighlighter/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/mnt/c/work/wpdev/syntaxhighlighter/wordpress/wp-content/plugins/syntaxhighlighter/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
yarn --version (if you use Yarn): 1.12.3 but not using Yarn in this case
npm ls cgb-scripts (if you haven’t ejected): 1.13.0
Operating system: Ubuntu 18.04.1 via WSL in Windows 10
Possible Solution
Perhaps the minification script or something comes along second and tries to access the CSS file but it doesn't exist because it wasn't needed? A file exists check might fix it?
Hi,
I've got the same error. But I work with 2 blocks in 2 separate CGB project. One has ejected webpack configuration and the other not. With just common.scss, the second throw the error on build but not the first.
EDIT
I eject CGB webpack configuration and I remove manually all configurations about styles. Work fine.
Getting the same error, since I don't need any styles in my blocks. Can this be fixed?
Putting the files back into their folders is not fixing this issue.
As i see the issue is still opened.
I have created a loophole, where i keep the files as empty, and ,most important ,keep the imports in the src/block/block.js
Bug Report
My block doesn't have any custom styling to go with it, so I've removed the
.scss
files:https://github.com/Viper007Bond/syntaxhighlighter/tree/master/src
Expected Behavior
npm run build
would generateblocks.build.js
and that's it.Actual Behavior
An error is thrown because the CSS file(s) don't exist.
Steps to Reproduce
.scss
file(s) fromsrc
directory.npm run build
.Real world example repository: https://github.com/Viper007Bond/syntaxhighlighter
node -v
: v10.14.1npm -v
: 6.4.1yarn --version
(if you use Yarn): 1.12.3 but not using Yarn in this casenpm ls cgb-scripts
(if you haven’t ejected): 1.13.0Operating system: Ubuntu 18.04.1 via WSL in Windows 10
Possible Solution
Perhaps the minification script or something comes along second and tries to access the CSS file but it doesn't exist because it wasn't needed? A file exists check might fix it?
Reproducible Demo
https://github.com/Viper007Bond/syntaxhighlighter
The text was updated successfully, but these errors were encountered: