[wp-trac] [WordPress Trac] #51066: missing 'balanced-match' dependency in block editor install package for windows
WordPress Trac
noreply at wordpress.org
Wed Aug 19 17:42:12 UTC 2020
#51066: missing 'balanced-match' dependency in block editor install package for
windows
------------------------------+-----------------------------
Reporter: nightloader | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: 5.5
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
Hello, I have been having some problems setting up an environment to work
with the block editor. I hope this is the right place to report what I
think is an issue with the wordpress/scripts module, apologies if I am
mistaken(tired).
local setup :
* windows 8.1
* wordpress 5.5 running on [https://www.wampserver.com/ Wampserver] 3.1.3
* {{{node --version}}} v12.18.3
* {{{npm --version}}} 6.14.6
steps to reproduce, following the procedure detailed here :
[https://developer.wordpress.org/block-editor/tutorials/javascript/js-
build-setup/ js-build-setup]. Reproduced for clarity and future reference
:
1. run command prompt(cmd.exe) in administrator mode(just to be sure that
isn't a problem)
2. {{{cd path\to\target\folder\}}}
3. {{{npm init}}}
4. {{{npm install @wordpress/scripts --save-dev}}}
however, the process fails here when attempting to install the
dependencies. Hopefully I remembered to include the error log it generated
but here is what I thought were the relevant parts (the "[...]" parts
intended to denote omitted code)
{{{
[...]
Error: Cannot find module 'balanced match'
[...]
npm ERR! node-sass at 4.14.1 install: 'node scripts/install.js'
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass at 4.14.1 install script.
[...]
}}}
Of course this means that the install aborts without completing. It would
''appear'' that the problem can be fixed by manually installing the
missing dependency and re-attempting to install the module.
5. {{{npm install balanced-match}}}
6. {{{npm install @wordpress/scripts --save-dev}}}
which gives me the following packages.json file
{{{
{
"name": "plugin",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "wp-scripts start",
"build": "wp-scripts build"
},
"author": "",
"license": "ISC",
"dependencies": {
"balanced-match": "^1.0.0"
},
"devDependencies": {
"@wordpress/scripts": "^12.1.1"
},
"description": ""
}
}}}
Now, I haven't tested this yet with actual code as I spent far too long
trying to complete the install procedure and messing around with node and
generally just getting angry, but I'm guessing that it's a missing
dependency in @wordpress/scripts ?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51066>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list