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

Multiple issues getting it up and running on windows #4

Open
KieranGreenwood opened this issue Sep 16, 2019 · 0 comments
Open

Multiple issues getting it up and running on windows #4

KieranGreenwood opened this issue Sep 16, 2019 · 0 comments

Comments

@KieranGreenwood
Copy link

KieranGreenwood commented Sep 16, 2019

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

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


> [email protected] 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! [email protected] build: `NODE_ENV=production webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

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

[email protected] 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.

@KieranGreenwood KieranGreenwood changed the title Error running npx create-cloud-block my-block multiple issues getting it up and running on windows Sep 17, 2019
@KieranGreenwood KieranGreenwood changed the title multiple issues getting it up and running on windows Multiple issues getting it up and running on windows Sep 17, 2019
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

No branches or pull requests

1 participant