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.

command error on npm run build-watch

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ggetzcommented, 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.

0reactions
sanjeetsuhagcommented, Nov 14, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack run build & watch ERROR - npm - Stack Overflow
I tried to run this command npm run build and npm run watch those scripts exists here in package.json file as.
Read more >
watch:build not working · Issue #12 · keithamus/npm-scripts ...
It seems: nodemon -q -w assets/ --ext '.' --exec 'npm run build' is causing something weird with npm and I get the default...
Read more >
npm-watch
Start using npm-watch in your project by running `npm i npm-watch`. There are 168 other projects in the npm registry using npm-watch.
Read more >
ResourcePackages: Npm Start Script Not Finishing
This article provides explanation on the npm start command run on the Sitefinity resource packages.
Read more >
r/nextjs - 'Bus Error' while running 'npm run build' or ... - Reddit
I had to delete node modules and the lock file and redo npm install. I used yarn commands to deploy(did not use yarn...
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