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

command error on npm run build-watch #10897

Closed
jiangheng90 opened this issue Nov 11, 2022 · 5 comments
Closed

command error on npm run build-watch #10897

jiangheng90 opened this issue Nov 11, 2022 · 5 comments

Comments

@jiangheng90
Copy link
Contributor

for npm run build-watch command. both my computer in home and company got error below

[21:53:07] Finished 'build' after 18 s
[21:53:07] Starting '<anonymous>'...
[21:53:07] '<anonymous>' errored after 527 ms
[21:53:07] TypeError: (intermediate value) is not iterable
    at file:///E:/cesium/gulpfile.js:162:44
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
[21:53:07] 'buildWatch' errored after 18 s

for error throw in gulpfile, it comes from

let [esmResult, iifeResult, cjsResult] = await bundleCesiumJs({
  minify: minify,
  path: outputDirectory,
  removePragmas: removePragmas,
  sourcemap: sourcemap,
  incremental: true,
});

the deconstruction throw it. I see the return of bundleCesiumJs is a object.

I have tried to fix this one with:

const bundleResult = await bundleCesiumJs({
  minify: minify,
  path: outputDirectory,
  removePragmas: removePragmas,
  sourcemap: sourcemap,
  incremental: true,
});
let esmResult = bundleResult.esmBundle;
let iifeResult= bundleResult.iifeBundle;
let cjsResult= bundleResult.nodeBundle;
...

then bundleWorkers comes another options.input undefined cause globby throw error

[22:14:17] Finished 'build' after 23 s
[22:14:17] Starting '<anonymous>'...
[22:14:17] '<anonymous>' errored after 786 ms
[22:14:17] TypeError: Patterns must be a string or an array of strings
    at assertPatternsInput (file:///E:/cesium/node_modules/globby/index.js:15:9)
    at toPatternsArray (file:///E:/cesium/node_modules/globby/index.js:21:2)
    at file:///E:/cesium/node_modules/globby/index.js:55:66        
    at bundleWorkers (file:///E:/cesium/build.js:420:25)
    at file:///E:/cesium/gulpfile.js:177:9
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
[22:14:17] 'buildWatch' errored after 23 s

then I stop on this error, recently I wiil keep track on this

@ggetz
Copy link
Contributor

ggetz commented Nov 11, 2022

Hi there, thanks for the report. What version of node are you using?

For example:

$ node -v
v16.15.0

@jiangheng90
Copy link
Contributor Author

@ggetz here is my develop environment
my home computer
node version: v14.17.5
npm version: 6.14.14
terminal: cmd on window 11

my working computer
node version: some version after 16
npm version: some version 8.19
terminal: cmd on window 10

both this two versions throw error

@ggetz
Copy link
Contributor

ggetz commented Nov 14, 2022

@sanjeetsuhag Would you be able to take a look at this? Technically NodeJS 14 is the minimum version we recommend. Is that still accurate?

@sanjeetsuhag
Copy link
Contributor

Taking a look at this now, @ggetz. On my system, I mostly use Node 16 and 18, so I'll check what works and doesn't work on Node 14 with the new scripts.

@ggetz
Copy link
Contributor

ggetz commented Dec 9, 2022

Thanks for your patience @jiangheng90.

npm workspackes are only supported in Node 16 and above, which is why we've documented a minimum Node version of 16 or above in the build guide to build the code or run development scripts.

However, workspaces are not required to run the packaged/shipped code, which is why the minimum supported Node version defined in package.json is >14.

@ggetz ggetz closed this as completed Dec 9, 2022
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

3 participants