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

Missing NPM dependencies #248

Closed
victorb opened this issue Aug 11, 2018 · 2 comments
Closed

Missing NPM dependencies #248

victorb opened this issue Aug 11, 2018 · 2 comments
Labels

Comments

@victorb
Copy link

victorb commented Aug 11, 2018

Trying to get the tests to run locally, so cloned the project and ran yarn install to install the dependencies. But it fails with the following message:

$ yarn install
yarn install v1.6.0
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@types/node/-/node-9.4.2.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "/home/user/projects/jvilk/browserfs/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

And going to the latest Travis build on master seems to also have this issue: https://travis-ci.org/jvilk/BrowserFS/jobs/398322300

image

Unsure on how to proceed from here and get it working. Readme mentions nothing about it, so guessing something went wrong with the @types/node package (unpublished?) or similar.

@victorb
Copy link
Author

victorb commented Aug 11, 2018

I found the following issue: DefinitelyTyped/DefinitelyTyped#17475

So setting the registry to registry.npmjs.org should fixed it. It doesn't for this repository though, as the paths in yarn.lock are hardcoded to use registry.yarnpkg.com (example). However, running install with the registry removes the first error, it introduces new errors because the versions defined in the package.json are not accurate enough (I'm guessing), leading to this:

yarn install v1.6.0
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning dropbox > superagent-proxy > proxy-agent > socks-proxy-agent > socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
warning remap-istanbul > gulp-util@3.0.7: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
[3/5] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
success Saved lockfile.
$ npm run dist

> browserfs@2.0.0 dist /home/user/projects/jvilk/browserfs
> npm-run-all build lint script:make_dist dist:build:node


> browserfs@2.0.0 build /home/user/projects/jvilk/browserfs
> npm-run-all --parallel build:tsc build:scripts --sequential build:rollup --parallel build:webpack build:webpack-release


> browserfs@2.0.0 build:tsc /home/user/projects/jvilk/browserfs
> tsc -p src


> browserfs@2.0.0 build:scripts /home/user/projects/jvilk/browserfs
> tsc -p scripts

node_modules/@types/node/index.d.ts:686:14 - error TS2484: Export declaration conflicts with exported declaration of 'Buffer'.

686     export { BuffType as Buffer, SlowBuffType as SlowBuffer };
                 ~~~~~~~~~~~~~~~~~~


src/backend/Dropbox.ts:400:40 - error TS2339: Property 'path' does not exist on type 'UploadErrorPath'.

400           cb(WriteErrorToError(upError.path.reason, p, GetErrorMessage(e)));
                                           ~~~~


src/backend/Dropbox.ts:510:40 - error TS2339: Property 'path' does not exist on type 'UploadErrorPath'.

510           cb(WriteErrorToError(upError.path.reason, p, GetErrorMessage(e)));
                                           ~~~~

Looking in the lock file, it seems it's pointing to version 9.4.2 of @types/node, a version that doesn't exists... You can verify this with curl registry.npmjs.org/$types/node | jq '.versions["9.4.2"]'

@jvilk
Copy link
Owner

jvilk commented Aug 11, 2018

Thanks for looking into this. I had no idea this was causing a problem!

I'll have a go at updating the dependencies today or tomorrow.

@jvilk jvilk added the bug label Aug 11, 2018
@jvilk jvilk changed the title How to install dependencies? Missing NPM dependencies Aug 11, 2018
@jvilk jvilk closed this as completed in 28a26cb Aug 12, 2018
willemneal pushed a commit to willemneal/BrowserFS that referenced this issue Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants