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

UUID fails (on some versions of node and on windows) #40

Closed
jeff-zucker opened this issue Aug 12, 2020 · 10 comments
Closed

UUID fails (on some versions of node and on windows) #40

jeff-zucker opened this issue Aug 12, 2020 · 10 comments
Labels
bug Something isn't working

Comments

@jeff-zucker
Copy link
Member

After I did npm install, I got this when trying to run npm build

solid-rest@1.2.2 test /var/www/html/solid/solid-rest
node tests/all

/var/www/html/solid/solid-rest/node_modules/uuid/dist/esm-browser/index.js:1
export { default as v1 } from './v1.js';
^^^^^^

SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:1060:16)
at Module._compile (internal/modules/cjs/loader.js:1108:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)
at Module.load (internal/modules/cjs/loader.js:993:32)
at Function.Module._load (internal/modules/cjs/loader.js:892:14)
at Module.require (internal/modules/cjs/loader.js:1033:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (/var/www/html/solid/solid-rest/src/rest.js:8:14)
at Module._compile (internal/modules/cjs/loader.js:1144:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)
npm ERR! Test failed. See above for more details.

@jeff-zucker jeff-zucker added the bug Something isn't working label Aug 12, 2020
@bourgeoa bourgeoa mentioned this issue Aug 12, 2020
@jeff-zucker
Copy link
Member Author

I committed pull #41 and refreshed my local, install, built and the tests still fail the same way. It is apparently looking for the uuid package in dist/esm-browser. I don't know where else it should look or how to make it look somewhere else.

@bourgeoa
Copy link
Member

  • I pulled from upstream (jeff-zucker/solid/rest) so inlude PR#41
  • I pushed to bourgeoa/solid/rest
    so we are in line uuid version is 8.3.0

Then :

  • I deleted node_modules and package-lock.json
  • made npm install and node tests/all --> all tests passes

what can be different in your situation ?

@jeff-zucker
Copy link
Member Author

I did the same - pulled all commits, deleted node_modules and package-lock.json, then ran npm install and npm build and npm tests and got the same results as above. :-(

@bourgeoa
Copy link
Member

node v14.6
npm v6.14.6
on Ubuntu v20

on googling for uuid export { default as v1 } from './v1.js'
Among other things there seems to be a problem with node version

https://stackoverflow.com/questions/62676974/syntaxerror-unexpected-token-export

@jeff-zucker
Copy link
Member Author

@bourgeoa , I cleaned up a couple of things, upgraded my node version so I now have

node v14,8.0
npm v6.14.7
on Mint 18.04

I also updated the travis.yml so that travis now uses v14 of node.

It now works for me locally and the linux and Mac tests pass on Travis. All tests on Windows pass, except for the two that depend on uuid in file:// (they work in app://).

I don't have a windows box to test. I suppose I will npm it anyway?

@bourgeoa
Copy link
Member

I don't have a windows box to test. I suppose I will npm it anyway?

It should be nice.
I added to my to-do testing solid-rest with windows.

@jeff-zucker jeff-zucker changed the title UUID fails UUID fails (now, on windows only) Sep 8, 2020
@jeff-zucker jeff-zucker changed the title UUID fails (now, on windows only) UUID fails (on some versions of node and on windows) Sep 27, 2020
@jeff-zucker
Copy link
Member Author

A user reports that UUID also fails on node 14.11.0, OSX 10.14.6.

@bourgeoa
Copy link
Member

@jeff-zucker
uuidjs/uuid#465
https://stackoverflow.com/questions/62164814/cant-use-uuid-module-when-running-tests-with-jest/62210156#62210156

I tried to to go back to an older version of uuid as suggested and used uuid v3.4.0 in solid-rest and in solid-file-client tests.
Tests passes on both.
I do not change anything in the code. Just cleared node_modules and package-lock.json.

Can you try to see if it passes travis on windows ?

@bourgeoa
Copy link
Member

bourgeoa commented Nov 5, 2020

solved with PR #49

@jeff-zucker
Copy link
Member Author

AFAIK, fixed in v1.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants