question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dependencies and building

See original GitHub issue

Hello, I’m having some trouble running tests which I want to do before any PR. Basically, npm won’t work for me (arch linux, node 10.1.0 - npm 6.0.0). I tried switching with nvm to node LTS and even to the same ones used in travis (which builds and test find): node --version v6.14.2 - npm --version 3.10.10 but didn’t work .

The only way I found to build and run tests is with yarn: “yarn install && yarn run build && yarn test”. But a heads up, - if you remove yarn.lock and regenerate it will start failing just npm : rm -rf yarn.lock package-lock.json node_modules; yarn; yarn install && yarn run build && yarn test

ERRORS:

With node ÑTS and latest, when you use npm or yarn (after yarn.lock is re-generated), the error is :

/home/sg/git/ts-simple-ast/node_modules/typescript/lib/typescript.js:2697
                    result = f(result, array[pos], pos);
                             ^
TypeError: f is not a function
    at /home/sg/git/ts-simple-ast/node_modules/typescript/lib/typescript.js:3025:86
    at reduceLeft (/home/sg/git/ts-simple-ast/node_modules/typescript/lib/typescript.js:2697:30)

With node 6.14.2 (same as in travis) the error is:

yarn test
yarn run v1.6.0
$ cross-env TS_NODE_COMPILER="ttypescript" nyc --reporter=lcov mocha --opts mocha.opts
/home/sg/git/ts-simple-ast2/ts-simple-ast/node_modules/ttypescript/lib/patchCreateProgram.js:33
            compilerOptions = { ...config.options, ...compilerOptions };
                                ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:56:10)
    at runInThisContext (vm.js:97:10)
    at Object.vm.runInThisContext (/home/sg/git/ts-simple-ast2/ts-simple-ast/node_modules/nyc/node_modules/istanbul-lib-hook/lib/hook.js:142:16)

I’m really not understanding how this works in travis - and with node 6.x . Tried to execute tests without instrumentation but got same errors. I would like to investigate this issue further but first wanted to know if there’s any trick I’m not aware ? Right know installing a VM exactly the same as travis to test there…

Any tip is most welcome! thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dsherretcommented, May 17, 2018

Yeah, it only affects the CI and the tests are passing on there so should be ok. It won’t affect anyone using the package. I’ll hopefully be able to revert it back within a few days.

For sure! Any questions you may have about using the library, please feel free to open an issue and I will get around to them. I’m fine with people opening issues to ask questions because then it’s searchable and might help other people.

For questions about the actual code within the library… perhaps I should set up something. For the time being, if you have those kind of questions then feel free to just ask them within this issue if you’d like.

1reaction
cancerberoSgxcommented, May 17, 2018

Everything OK now, removing package-lock.json, node_modules and just exec npm i && npm test with node 10 and npm 6. Thanks .

Upgrading node version in .travis.yml shouldn’t hurt right ? (I do understand @types/node we cannot yet) Thanks! (I have /might have a couple of punctual questions do you think it’s OK to ask here in issues ?) do we have other channels besides this ? - the last I want to do is take your time… maybe google groups ? or a wiki page so you can take a look only when convenient ?) thanks gain

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to manage build dependencies - IBM
Indirect build dependencies define relationships between the program source and the outputs from previous build processes. While indirect dependencies are ...
Read more >
Dependencies and build order - Rowley Associates
Project dependencies make it possible to build solutions in the correct order and, where the target permits, to load and delete applications and...
Read more >
What Are Project Dependencies? How To Plan & Map Them
Mandatory dependencies are a required part of a project, and for the project to be completed successfully – these dependencies cannot be changed ......
Read more >
Add build dependencies - Android Developers
Learn how to add build dependencies using the Gradle build system in Android Studio.
Read more >
What are dependencies in project management ... - Workzone
Company Out – Project Out Dependencies: For a project to reach completion, the company building must be sturdy and accessible.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found