Skip to content

Multiple issues getting it up and running on windows #4

@KieranGreenwood

Description

@KieranGreenwood

Could do with troubleshooting guidance for windows as I had a multiple issues trying to get this running on windows (7) and ubuntu (16).

Running: npx create-cloud-block test-block reuslts in

OUTPUT

npx: installed 23 in 44.024s
Creating a new Cloud Block in C:\localserver-2\webroot\active\test-block
Extracting example files
Installing packages. This might take a couple of minutes.
npm ERR! code ENOLOCAL
npm ERR! Could not install from "" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-09-17T09_17_11_172Z-debug.log
Success! Created test-block at C:\localserver-2\webroot\active\test-block

cd test-block && npm start

OUTPUT

> test-block@1.0.0 start C:\localserver-2\webroot\active\test-block
> npm run build && BLOCK_DIR=$PWD npm --prefix node_modules/@frontkom/g-editor start


> test-block@1.0.0 build C:\localserver-2\webroot\active\test-block
> NODE_ENV=production webpack

'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-block@1.0.0 build: `NODE_ENV=production webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-block@1.0.0 build script.

Added NODE_ENV = development to PATH environment variable.
Ran npm install -g win-node-env to install the win-node-env package.

Re executed npm start

OUTPUT

test-block@1.0.0 start C:\localserver-2\webroot\active\test-block
npm run build && BLOCK_DIR=$PWD npm --prefix node_modules/@frontkom/g-editor start

test-block@1.0.0 build C:\localserver-2\webroot\active\test-block
NODE_ENV=production webpack

C:\Users\user\AppData\Roaming\npm\node_modules\webpack-cli\bin\cli.js:93
throw err;
^

Error: Cannot find module 'clean-webpack-plugin'

Ran npm install inside the directory

OUTPUT

added 2039 packages from 694 contributors and audited 42681 packages in 571.476s
found 63 low severity vulnerabilities

Re-executed npm start Build succeeded but still failed:
OUTPUT

'BLOCK_DIR' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1

Had to tweak package.json again to update the script to:

"scripts": {
	"build": "SET NODE_ENV=production webpack",
	"start": "npm run build && SET BLOCK_DIR=C:\\localserver-2\\webroot\\active\\test-block\\&& npm --prefix node_modules/@frontkom/g-editor start",
	"deploy": "npm run build && npm publish --access public"
},

This gets everything up and running - how ever the build script doesn't do anything so development isn't possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions