owncloud / owncloud-sdk

:cloud: ownCloud client library for JavaScript
https://owncloud.dev/owncloud-sdk/
MIT License
75 stars 33 forks source link

Cannot find module "@babel/polyfill" #1197

Open yunylz opened 1 year ago

yunylz commented 1 year ago
C:\Users\Asus\Desktop\owncloud-test>npm install owncloud-sdk

added 49 packages, and audited 50 packages in 7s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

C:\Users\Asus\Desktop\owncloud-test>node index.js
node:internal/modules/cjs/loader:988
  throw err;
  ^

Error: Cannot find module '@babel/polyfill'
Require stack:
- C:\Users\Asus\Desktop\owncloud-test\node_modules\owncloud-sdk\dist\owncloud.js
- C:\Users\Asus\Desktop\owncloud-test\index.js
←[90m    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)←[39m
←[90m    at Function.Module._load (node:internal/modules/cjs/loader:833:27)←[39m
←[90m    at Module.require (node:internal/modules/cjs/loader:1057:19)←[39m
←[90m    at require (node:internal/modules/cjs/helpers:103:18)←[39m
    at Object.<anonymous> ←[90m(C:\Users\Asus\Desktop\owncloud-test\←[39mnode_modules\←[4mowncloud-sdk←[24m\dist\owncloud.js:1:6705←[90m)←[39m
    at s ←[90m(C:\Users\Asus\Desktop\owncloud-test\←[39mnode_modules\←[4mowncloud-sdk←[24m\dist\owncloud.js:1:356←[90m)←[39m
    at Object.<anonymous> ←[90m(C:\Users\Asus\Desktop\owncloud-test\←[39mnode_modules\←[4mowncloud-sdk←[24m\dist\owncloud.js:1:6660←[90m)←[39m
    at s ←[90m(C:\Users\Asus\Desktop\owncloud-test\←[39mnode_modules\←[4mowncloud-sdk←[24m\dist\owncloud.js:1:356←[90m)←[39m
    at ←[90mC:\Users\Asus\Desktop\owncloud-test\←[39mnode_modules\←[4mowncloud-sdk←[24m\dist\owncloud.js:1:1155
    at ←[90mC:\Users\Asus\Desktop\owncloud-test\←[39mnode_modules\←[4mowncloud-sdk←[24m\dist\owncloud.js:1:1164 {
  code: ←[32m'MODULE_NOT_FOUND'←[39m,
  requireStack: [
    ←[32m'C:\\Users\\Asus\\Desktop\\owncloud-test\\node_modules\\owncloud-sdk\\dist\\owncloud.js'←[39m,
    ←[32m'C:\\Users\\Asus\\Desktop\\owncloud-test\\index.js'←[39m
  ]
}
yunylz commented 1 year ago

i've tried npm i -D owncloud-sdk and pact-js is giving 404

npm ERR! code 1
npm ERR! path C:\Users\Asus\Desktop\owncloud-test\node_modules\owncloud-sdk\node_modules\@pact-foundation\pact
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build=false || neon build --release
npm ERR! 404 status code downloading tarball https://github.com/pact-foundation/pact-js/releases/download/v10.0.0-beta.36/node-v93-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.13.0
npm ERR! node-pre-gyp info using node@16.18.0 | win32 | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "C:\Users\Asus\Desktop\owncloud-test\node_modules\owncloud-sdk\node_modules\@pact-foundation\pact\native\index.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/pact-foundation/pact-js/releases/download/v10.0.0-beta.36/node-v93-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/pact-foundation/pact-js/releases/download/v10.0.0-beta.36/node-v93-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install error
npm ERR! node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://github.com/pact-foundation/pact-js/releases/download/v10.0.0-beta.36/node-v93-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! stack     at PassThrough.<anonymous> (C:\Users\Asus\Desktop\owncloud-test\node_modules\owncloud-sdk\node_modules\node-pre-gyp\lib\install.js:149:27)
npm ERR! node-pre-gyp ERR! stack     at PassThrough.emit (node:events:525:35)
npm ERR! node-pre-gyp ERR! stack     at ClientRequest.<anonymous> (C:\Users\Asus\Desktop\owncloud-test\node_modules\owncloud-sdk\node_modules\needle\lib\needle.js:538:9)
npm ERR! node-pre-gyp ERR! stack     at Object.onceWrapper (node:events:628:26)
npm ERR! node-pre-gyp ERR! stack     at ClientRequest.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
npm ERR! node-pre-gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
npm ERR! node-pre-gyp ERR! stack     at TLSSocket.socketOnData (node:_http_client:534:22)
npm ERR! node-pre-gyp ERR! stack     at TLSSocket.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at addChunk (node:internal/streams/readable:315:12)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19044
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Asus\\Desktop\\owncloud-test\\node_modules\\owncloud-sdk\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build=false"
npm ERR! node-pre-gyp ERR! cwd C:\Users\Asus\Desktop\owncloud-test\node_modules\owncloud-sdk\node_modules\@pact-foundation\pact
npm ERR! node-pre-gyp ERR! node -v v16.18.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.13.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! 'neon' is not recognized as an internal or external command,
npm ERR! operable program or batch file.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Asus\AppData\Local\npm-cache\_logs\2022-12-19T21_48_55_241Z-debug-0.log
phil-davis commented 1 year ago

@chaeyan I was trying to run the pact tests locally today and discovered that it still has to have node 14:

$ nvm install 14
Now using node v14.21.3 (npm v6.14.18)
$ node -v
v14.21.3
$ yarn -v
3.2.0
$ make
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 244ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 384ms
➤ YN0000: ┌ Link step
➤ YN0004: │ core-js@npm:2.6.12 lists build scripts, but all build scripts have been disabled.
➤ YN0004: │ @pact-foundation/pact-core@npm:11.1.1 lists build scripts, but all build scripts have been disabled.
➤ YN0000: └ Completed in 0s 673ms
➤ YN0000: Done with warnings in 1s 397ms
$ yarn test-consumer
...
phil-davis commented 1 year ago

I made PR #1238 to document that node 14 is needed. node will be "stuck" like that until issue #924 gets sorted out.