Type error: ',' expected when running yarn build - error-handling

I'm working with this template from github for Nextjs/BigCommerce and I'm trying to integrate Webflow into it by following this article https://dev.to/kennedyrose/integrating-webflow-and-next-js-39kk.
The article requires me to add a few packages, such as cheerios, axios, html-react-parser (all added with yarn add)
Yarn dev works fine, but when I run yarn build, I receive the following error
"Type error: ',' expected."
What is the issue here?
Thanks!
PS: I've updated typescript to the latest version
Edit: here is the error log
next-commerce:build: Failed to compile.
next-commerce:build:
next-commerce:build: ../node_modules/cheerio-select/lib/index.d.ts:1:15
next-commerce:build: Type error: ',' expected.
next-commerce:build:
next-commerce:build: > 1 | import { type Options as CSSSelectOptions } from "css-select";
next-commerce:build: | ^
next-commerce:build: 2 | import type { Element, AnyNode, Document } from "domhandler";
next-commerce:build: 3 | export { filters, pseudos, aliases } from "css-select";
next-commerce:build: 4 | export interface Options extends CSSSelectOptions<AnyNode, Element> {
next-commerce:build:
next-commerce:build: > Build error occurred
next-commerce:build: Error: Call retries were exceeded
next-commerce:build: at ChildProcessWorker.initialize (C:\Users\User\Documents\My-Bigcommerce\node_modules\next\dist\compiled\jest-worker\index.js:1:11661)
next-commerce:build: at ChildProcessWorker._onExit (C:\Users\User\Documents\My-Bigcommerce\node_modules\next\dist\compiled\jest-worker\index.js:1:12599)
next-commerce:build: at ChildProcess.emit (node:events:527:28)
next-commerce:build: at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
next-commerce:build: type: 'WorkerError'
next-commerce:build: }
next-commerce:build: error Command failed with exit code 1.
next-commerce:build: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
next-commerce:build: ERROR: command finished with error: command (site) yarn run build exited (1)
command (site) yarn run build exited (1)
Tasks: 11 successful, 12 total
Cached: 11 cached, 12 total
Time: 5.672s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I had this and the issue for me was I was using an outdated version of cheerio. Fixed it by running
yarn add cheerio#latest
Then yarn build ran fine.

I had this same issue and updating Typescript to its latest version fixed the problem. I installed typescript#4.9.5.
You can install the latest version with the next command:
yarn add typescript#latest
// or
npm install typescript#latest

Related

Running npx create-expo-module results in "Error: npm exited with non-zero code: 1"

I'm trying to create my own Expo module following the instructions in the Expo documentation.
When I run the command npx create-expo-module and I fill out the information that it asks me for (name of npm package, module name, GitHub profile, etc.), it manages to do the first two steps of the module creation:
✔ Downloaded module template from npm
✔ Created the module from template files
But then it gives me this error in the 3rd step:
✖ Installing module dependencies
Error: npm exited with non-zero code: 1
at ChildProcess.completionListener (C:\Users\super\AppData\Local\npm-cache\_npx\62900f925a4b91dc\node_modules\#expo\spawn-async\build\spawnAsync.js:41:23)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.cp.emit (C:\Users\super\AppData\Local\npm-cache\_npx\62900f925a4b91dc\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
...
at spawnAsync (C:\Users\super\AppData\Local\npm-cache\_npx\62900f925a4b91dc\node_modules\#expo\spawn-async\build\spawnAsync.js:7:23)
at installDependencies (C:\Users\super\AppData\Local\npm-cache\_npx\62900f925a4b91dc\node_modules\create-expo-module\build\packageManager.js:9:37)
at C:\Users\super\AppData\Local\npm-cache\_npx\62900f925a4b91dc\node_modules\create-expo-module\build\create-expo-module.js:49:56
at newStep (C:\Users\super\AppData\Local\npm-cache\_npx\62900f925a4b91dc\node_modules\create-expo-module\build\utils.js:21:22)
at Command.main (C:\Users\super\AppData\Local\npm-cache\_npx\62900f925a4b91dc\node_modules\create-expo-module\build\create-expo-module.js:48:31) {
pid: 23924,
output: [ '', '' ],
stdout: '',
stderr: '',
status: 1,
signal: null
}
I'm able to create new Expo projects with expo init without an issue and run them with expo start, so I don't know what the issue could be. My version of the Expo CLI is 6.0.6 and npm is 8.19.2.

Why do I get this error: Can't resolve './components/forms/LoginForm'

Why do I get this error after running the npm run dev command:
npm run development
ERROR in ./resources/js/app.js 5:0-53
Module not found: Error: Can't resolve './components/forms/LoginForm' in 'D:\wamp64\www\my-website\my-website\resources\js'
Try registering the component like this
'./components/forms/LoginForm.vue'

How do I compile react-native android?

I have created a react-native app. I did it according to the instructions from the official "React" website. but my react-native android project won't start.
Console:
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1289 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
:ReactNative:Unexpected empty result of running '[node, C:\Users\Кирилл\Desktop\helloWorld\MyReactNative\node_modules\#react-native-community\cli\build\bin.js, config]' command.
:ReactNative:Running '[node, C:\Users\Кирилл\Desktop\helloWorld\MyReactNative\node_modules\#react-native-community\cli\build\bin.js, config]' command failed.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\������\Desktop\helloWorld\MyReactNative\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' line: 195
* What went wrong:
A problem occurred evaluating script.
> node:internal/modules/cjs/loader:903 throw err; ^Error: Cannot find module 'C:\Users\Кирилл\Desktop\helloWorld\MyReactNative\node_modules\#react-native-community\cli\build\bin.js' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:900:15) at Function.Module._load (node:internal/modules/cjs/loader:745:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: []}
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 9s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
:ReactNative:Unexpected empty result of running '[node, C:\Users\Кирилл\Desktop\helloWorld\MyReactNative\node_modules\#react-native-community\cli\build\bin.js, config]' command.
npm ERR! code 1
npm ERR! path C:\Users\Кирилл\Desktop\helloWorld\MyReactNative
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c "react-native run-android"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Кирилл\AppData\Local\npm-cache\_logs\2020-11-13T08_19_01_474Z-debug.log
What should I do?
I have android sdk on drive D and jdk on drive C. Because of this, nothing worked. I have reinstalled android studio, sdk and jdk. Everything worked.
I have also faced this same issue in a React-Native project version 0.61.
I am now able to solve this issue by changing to Gradle version to 6.9.
My previous Gradle version was 6.4.1

Nuxt App Output Error when trying to Create

I want to initialize a Nuxt Project using the command
yarn create nuxt-app <project-name>
i get this error:
C:\Users\AbdulAzeez\AppData\Local\Yarn\Data\global\node_modules\sao\lib\installPackages.js:108
throw new SAOError(`Failed to install ${packageName} in ${cwd}`)
^
SAOError: Failed to install packages in C:\Users\AbdulAzeez\Desktop\vue-sax-demo
at ChildProcess.<anonymous> (C:\Users\AbdulAzeez\AppData\Local\Yarn\Data\global\node_modules\sao\lib\installPackages.js:108:15)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.cp.emit (C:\Users\AbdulAzeez\AppData\Local\Yarn\Data\global\node_modules\sao\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1051:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {
__sao: true
}
error Command failed.
Exit code: 1
Command: C:\Users\AbdulAzeez\AppData\Roaming\npm\bin\create-nuxt-app
Arguments: vue-sax-demo
Directory: C:\Users\AbdulAzeez\Desktop
Output:
This is not the first time, i'm creating a nuxt-project, I'm just getting this Error recently!
I even tried using npx, the same Error
Try to use the LTS version of node.js, the v14 is not stable. The current LTS version is 12.17.0 or see this link for the official LTS version if you are seen this in the future ( https://nodejs.org/en/download/)
after that run >>>
npx create-nuxt-app <project-name>

Problems compiling Bootstrap under windows using grunt

I'm trying to compile Bootstrap under windows. I know I'll have to deal with Jakyll later on, but currently im stuck here:
npm install
Which leads to an shasum error when it tries to install sauce-tunnel:
456 error Error: shasum check failed for C:\Users\ME\AppData\Local\Temp\npm-884-8iUK1-Qx\1397291845491-0.2589339539408684\tmp.tgz
456 error Expected: 3afd206b6e853cd508d45f92baf323af9d6a6627
456 error Actual: 13cd33918418cf6f1d305bd7daef22c44cf637bc
456 error From: https://registry.npmjs.org/sauce-tunnel-sc3-1/-/sauce-tunnel-sc3-1-1.0.0.tgz
456 error at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\sha\index.js:38:8
456 error at ReadStream.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\sha\index.js:85:7)
456 error at ReadStream.EventEmitter.emit (events.js:117:20)
456 error at _stream_readable.js:920:16
456 error at process._tickCallback (node.js:415:13)
457 error If you need help, you may report this *entire* log,
457 error including the npm and node versions, at:
457 error <http://github.com/npm/npm/issues>
458 error System Windows_NT 6.2.9200
I also tried to install it manually
npm install https://registry.npmjs.org/sauce-tunnel-sc3-1/-/sauce-tunnel-sc3-1-1.0.0.tgz
which only leads to another error:
npm ERR! cb() never called!
npm ERR! not ok code 0
Would be superb, if you could help!
Update: I forgot the Versions:
Node: v0.10.26
NPM: 1.4.3
Bootstrap : Git master (https://github.com/twbs/bootstrap.git)