Fractal: fratal fails to start with 'Microsoft JScript compilation error'

Created on 9 May 2016  路  14Comments  路  Source: frctl/fractal

was just starting this for the first time:
C:\DEV\2016\style\project-name>fractal start --watch

and this was the result:

Windows Script Host
---------------------------
Script: C:\DEV\2016\style\project-name\fractal.js
Line:   6
Char:   1
Error:  Syntax error
Code:   800A03EA
Source:     Microsoft JScript compilation error

my version of nodejs is 4.4.2. Any other idea?
thanks

bug

Most helpful comment

+1

windows 7
node : 4.4.7
npm 3.10.2

EDIT: running fractal.cmd will start everything correctly

All 14 comments

a colleague of mine is having the same issue.

node version: 6.1
npm version: 3.8.6

Thanks for the report guys. I'm no Windows expert but from a bit of research it sounds like the Fractal is not being run through Node but rather the Windows Script Host interpreter - probably due to the .js file extension.

I'm not quite sure why this is the case (or what I can do about it!), but I'll do some more research and let you know if once I've managed to find a solution.

+1

windows 7
node : 4.4.7
npm 3.10.2

EDIT: running fractal.cmd will start everything correctly

This seems to be working for people now after a small tweak to the bin file so I'm going to go ahead and close this issue. Please re-open if you are still affected when using the latest version.

Trying to get this working a colleagues Windows PC they're having this issue too.

I think I know what the issue is, running a where fractal from the project root tells me that Windows sees fractal.js first and tries to run it through the Windows Script Host interpreter.

C:\Projects\madgex-pattern-library> where fractal
C:\Projects\madgex-pattern-library\fractal.js
C:\Users\jim.oneill\AppData\Roaming\npm\fractal
C:\Users\jim.oneill\AppData\Roaming\npm\fractal.cmd

Pretty sure that's just how Windows pathing/priority works, so maybe a simple solution is to rename a projects fractal.js to fractal.conf.js or similar?

node v6.9.1
npm v3.10.8

This seems to be working for people now after a small tweak to the bin file

@allmarkedup it would have been helpful to point to the tweak you made... trying to figure out an issue in my entirely unrelated project and any other examples are helpful

Can we get some details of which bin file we are supposed to be editing?..

I had the same problem with postman-collection-converter package. The trick is to run the command with .js.cmd at the end. Like this >transform-collection.js.cmd

This issue can be avoided if fractal is run from Git Bash instead of the command prompt.

Hi I am still getting error while running cucumber --version on cmd as well as gitbash

Node - v8.9.3
npm - v5.5.1

Script : C:\Users\AppData\Roaming\npm\cucumber.js
Line: 1
Char: 1
Error: Invalid Character
Code: 800A03F6
Source: Microsoft Jscript compilation error

El mensaje ha llegado correctamente pero... estoy de vacaciones hasta el pr贸ximo 8 de enero. Atender茅 tu correo a la vuelta.

Si por el motivo que fuere necesitas ponerte en contacto con Adimedia puedes hacerlo en [email protected] o en el Telf. 943 63 57 37.

gracias esperaremos por su correo

Using Git Bash gives same error.
Best workaround on Windows is to rename fractal.js file and add config to package.json to use new config file: https://github.com/frctl/fractal/issues/118#issuecomment-255254117

I had the same problem but with another npm package. The solution was to go to "C:\Program Files\nodejs", then find the bat file for the package. In my case the package was named "powerline" so the bat file was named "powerline.bat". Then you need to open it and add "node" before line 4

Was this page helpful?
0 / 5 - 0 ratings

Related issues

weenzeel picture weenzeel  路  6Comments

dzwarg picture dzwarg  路  5Comments

julmot picture julmot  路  3Comments

patphongs picture patphongs  路  5Comments

allmarkedup picture allmarkedup  路  3Comments