Hi, I'm a newbie to preact. I want to debug preact, but when I run npm run test got the following error:
13 02 2017 11:02:38.084:ERROR [plugin]: Error during loading "F:\workspace\preact\node_modules/karma-sauce-launcher" plugin:
Cannot find module '../build/safe-execute'
START:
13 02 2017 11:02:44.304:INFO [karma]: Karma v1.4.1 server started at http://0.0.0.0:9876/
13 02 2017 11:02:44.305:INFO [launcher]: Launching browser PhantomJS with concurrency 2
13 02 2017 11:02:44.306:ERROR [karma]: Found 1 load error
nodejs: v6.9.5-x64
Can anyone know how to solve this? Thanks.
Hmm - I have no idea what error this is, doesn't seem related to preact at all. I can't seem to find any references to safe-execute anywhere in the dependencies, either. Perhaps it's a Karma incompatibility with Windows? How are you running npm run test?
seems to be babel related actually getting this error in a cucumber.js feature in es2016 syntax or maybe wd related. anyways hope that helps.
@aljones15 ah ok. Think we can close this then?
I was actually commenting because I was trying to find a solution to! But yeah it doesn't look like this is not a preact issue and is related to babel not finding a module. But I have no authority in your project! good luck with preact.
yeah further investigation reveals this file: safeExecuteJsScript = require('../build/safe-execute')
seems to be having issues with babel or the relative path is not working as intended
Where is that file located?
It looks like this can occur from a corrupted cache of the wd module. It's supposed to create ../build/safe-execute here:
https://github.com/admc/wd/blob/b1463ce/scripts/build-browser-scripts.js
Forcing a clean install of this module should resolve the issue. On travis I was able to resolve it by deleting my caches.
Thanks @voltrevo - that confirms it's not related to Preact. Good to have your explanation around for those finding this via Google or if we run into the issue on Travis.
Most helpful comment
It looks like this can occur from a corrupted cache of the
wdmodule. It's supposed to create../build/safe-executehere:https://github.com/admc/wd/blob/b1463ce/scripts/build-browser-scripts.js
Forcing a clean install of this module should resolve the issue. On travis I was able to resolve it by deleting my caches.