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

Error at exercise 4 #91

Open
vdloc opened this issue Feb 26, 2019 · 0 comments
Open

Error at exercise 4 #91

vdloc opened this issue Feb 26, 2019 · 0 comments

Comments

@vdloc
Copy link

vdloc commented Feb 26, 2019

I received an error when I've tried to verify this exercise.

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module 'babel-runtime/helpers/sliced-to-array'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (C:\Users\LV\AppData\Local\Temp\_babel_23428\executable.js:3:22)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

and here is my executable file:

import {PI, sqrt, square} from './module';
 const [ , , arg1, arg2] = process.argv;
 console.log(PI);
 console.log(sqrt(+arg1));
 console.log(square(+arg2));

and module file :

 export const PI = 3.141592;
var _sqrt = (s, x, last) => {
    return x!= last ? _sqrt(s, (x + s / x) / 2.0, x) : x;
}
 export const sqrt = s => _sqrt(s, s / 2.0, 0.0);
 export const square = x => x * x;
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