Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 15 hours ago.
Improve this question
I am working on a next js 13 application in which I am making an image upload service through the formidable package and the backblaze b2 object storage service, I get this error after starting my application in next js, it worked fine but I've been getting this error for a while now, I've already tried uninstalling the node modules and installing the latest versions of the npm dependencies.
error stacktrace
Critical dependency: the request of a dependency is an expression
Import trace for requested module:
./node_modules/formidable/src/Formidable.js
./node_modules/formidable/src/index.js
./controllers/uploadController.js
./controllers/productController.js
./app/page.jsx
warn - Fast Refresh had to perform a full reload due to a runtime error.
error - node_modules\backblaze-b2\lib\b2.js (24:4) # axiosRetry
error - TypeError: axiosRetry is not a function
at new B2 (webpack-internal:///(sc_server)/./node_modules/backblaze-b2/lib/b2.js:22:8)
at eval (webpack-internal:///(sc_server)/./lib/storageB2.js:8:18)
at (sc_server)/./lib/storageB2.js (C:\Users\fxliv\OneDrive\Escritorio\tuganga\.next\server\app\page.js:1005:1)
at __webpack_require__ (C:\Users\fxliv\OneDrive\Escritorio\tuganga\.next\server\webpack-runtime.js:33:43)
at eval (webpack-internal:///(sc_server)/./controllers/uploadController.js:5:72)
at (sc_server)/./controllers/uploadController.js (C:\Users\fxliv\OneDrive\Escritorio\tuganga\.next\server\app\page.js:983:1)
at __webpack_require__ (C:\Users\fxliv\OneDrive\Escritorio\tuganga\.next\server\webpack-runtime.js:33:43)
at eval (webpack-internal:///(sc_server)/./controllers/productController.js:9:75)
at (sc_server)/./controllers/productController.js (C:\Users\fxliv\OneDrive\Escritorio\tuganga\.next\server\app\page.js:972:1)
at __webpack_require__ (C:\Users\fxliv\OneDrive\Escritorio\tuganga\.next\server\webpack-runtime.js:33:43) {
type: 'TypeError',
page: '/'
}
null
I need someone to help me to continue working on my project, thanks!!
Related
I'm new to using cloudflare and wrangler. I've a project that I've been working on, and I'm now trying to deploy it using wrangler publish, but I keep running into issues. My product is coded in node.js, and I'm using version 2 of wrangler. When I execute wrangler publish I get:
Basic JavaScript project found. Skipping unnecessary build!
Error: Something went wrong with the request to Cloudflare...
Uncaught SyntaxError: Cannot use import statement outside a module
at worker.js:2Basic JavaScript project found. Skipping unnecessary build!
Error: Something went wrong with the request to Cloudflare...
Uncaught SyntaxError: Cannot use import statement outside a module
at worker.js:2
I've searched for a solution, and one of them that I found said to change module in wrangler.toml from type="javascript"to type="webpack" however that gives me a bunch of errors:
./node_modules/destroy/index.js
Module not found: Error: Can't resolve 'fs' ... Parsed request is a module...resolve as module
/Users/Desktop/APIs/cpiCalculator2/node_modules/destroy/node_modules doesn't exist or is not a directory
...
Error: webpack returned an error. You may be able to resolve this issue by running npm install.
I've tried reinstalling npm as it suggests and then wrangler publish again, but that just gives me the same error message.
I'm really not sure what the issue is, and I would really appreciate any help or advice on how to resolve this issue. Thank you!
Also, just a note, I'm not sure if this is affecting it, but I do have two other js documents in the main area of my project (where my index.js file is).
i am trying to create an app that can connect with metamask using walletconnect/react-native-dapp but i get this problem.
What went wrong:
A problem occurred evaluating project ':app'.
Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
for anyone encountering this down the road... Here's the solution.
React native dependencies in node_modules sometimes use outdated syntax such as the error above "compile" when it should be "implementation" depending on your RN version. I'd use the npm package patch-package or stack overflow how to properly modify dependencies (node_modules) to persist once you install another package.
I ran into this same issue with the same "walletconnect" amoung other errors but finally got it running - keep debugging! You got this.
Trying to execute any of the tests leads to this error popping up.
I am using Cypress 6.5.0
Really clueless about what to do.
Sorry for the image, but it was much better to show it this way.
And also the StackTrace.
at Object../node_modules/is-ci/node_modules/ci-info/index.js (webpack:///node_modules/is-ci/node_modules/ci-info/index.js:5:1)
at __webpack_require__ (webpack:///webpack/bootstrap:19:1)
at Object../node_modules/is-ci/index.js (webpack:///node_modules/is-ci/index.js:3:18)
at __webpack_require__ (webpack:///webpack/bootstrap:19:1)
at Object.eval (webpack:///node_modules/cypress/lib/util.js:21:14)
at Object../node_modules/cypress/lib/util.js (http://localhost:37869/__cypress/tests?p=test/e2e/support/index.js:87250:31)
at __webpack_require__ (webpack:///webpack/bootstrap:19:1)
at Object.eval (webpack:///node_modules/cypress/index.js:9:14)
at Object../node_modules/cypress/index.js (http://localhost:37869/__cypress/tests?p=test/e2e/support/index.js:82972:31)
at __webpack_require__ (webpack:///webpack/bootstrap:19:1)
From previous event:
at runScriptsFromUrls (http://localhost:37869/__cypress/runner/cypress_runner.js:177985:98)
at Object.runScripts (http://localhost:37869/__cypress/runner/cypress_runner.js:177999:11)
at $Cypress.onSpecWindow (http://localhost:37869/__cypress/runner/cypress_runner.js:167733:19)
This happened for me when I imported cypress within my test, removing that fixed the issue
Sometimes by mistake, Visual Studio Code will auto-import unnecessary libraries. You should delete them. For me it was
import { cli } from 'cypress';
It looks like you have something in /support/index.js (since it's mentioned in the stack trace) that should be in /plugins/index.js (since it has an invalid use of process which is only available in node.js).
Cypress runs both a browser process and a background node.js process.
/support/index.js is used to augment the browser process, and /plugins/index.js is used to augment the node.js process.
If you mix them up when adding a library, a task, or a file preprocessor you get an error of the type you show.
What's in /support/index.js?
If you just updated to react-scripts 5.x and facing this issue, there is currently a PR to fix it but a workaround to get your tests working ASAP is to update the env.js file in the react scripts node module as referenced in this PR.
NB: If you have a private artifact repository manager on jfrog it is advisable to push this fix to your registry and pull react scripts from there until the fix becomes publicly available.
TLDR;
You just updated to react 5.x and your cypress tests show the error below;
Solution
File: node_modules/react-scripts/config/env.js
Change the stringified method to:
// Stringify all values so we can feed into webpack DefinePlugin
const stringified = {
'process':{}, // This is the only line added to the previous method
'process.env': Object.keys(raw).reduce((env, key) => {
env[key] = JSON.stringify(raw[key]);
return env;
}, {}),
};
When we drive out gloval variable from JSON visual studiao automatically Import
import { cli } from 'cypress';
I commented following line from support/command.js and that reso I am using cypress 8.7
const { defineConfig } = require('cypress')
Remove import cypress from "cypress" from your POM fi
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I tried to add a devServer configuration into the babel.config.js file (Vue 3 project) and I get this error. Even when I copy the original code from the official site, it still reports this error.
The error:
Error: Unknown option: .devServer. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.
at throwUnknownError (/Users/aman/Desktop/Vue/vue01/node_modules/#babel/core/lib/config/validation/options.js:124:27)
at /Users/aman/Desktop/Vue/vue01/node_modules/#babel/core/lib/config/validation/options.js:109:5
at Array.forEach (<anonymous>)
at validateNested (/Users/aman/Desktop/Vue/vue01/node_modules/#babel/core/lib/config/validation/options.js:85:21)
at validate (/Users/aman/Desktop/Vue/vue01/node_modules/#babel/core/lib/config/validation/options.js:76:10)
at /Users/aman/Desktop/Vue/vue01/node_modules/#babel/core/lib/config/config-chain.js:200:34
at cachedFunction (/Users/aman/Desktop/Vue/vue01/node_modules/#babel/core/lib/config/caching.js:62:27)
at cachedFunction.next (<anonymous>)
at evaluateSync (/Users/aman/Desktop/Vue/vue01/node_modules/gensync/index.js:251:28)
at sync (/Users/aman/Desktop/Vue/vue01/node_modules/gensync/index.js:89:14)error Command failed with exit code 1.
How can I fix this error "Unknown option: .devServer"
In a Vue CLI project, your Webpack configuration goes in vue.config.js in your project root, not babel.config.js. If that file doesn't exist, you should create it and put your devServer configuration in it.
From the docs:
vue.config.js is an optional config file that will be automatically loaded by #vue/cli-service if it's present in your project root (next to package.json). You can also use the vue field in package.json, but do note in that case you will be limited to JSON-compatible values only.
vue.config.js (Not babel.config.js)
module.exports = {
devServer: {
// Your configuration goes here
}
}
I'm getting the following error after running stencil start and accessing the localhost url in my browser:
Uncaught Error: Module parse failed: Unexpected token (10:9)
You may need an appropriate loader to handle this file type.
|
| var getAccount = function getAccount() {
> return import('./theme/account');
| };
|
at Object../assets/js/app.js (bootstrap:83)
at __webpack_require__ (bootstrap:19)
at bootstrap:83
at bootstrap:83
(index):1064 Uncaught TypeError: window.stencilBootstrap is not a function
at (index):1064
This just started happening this morning, I was able to run stencil yesterday without any problems.
I've followed the steps here exactly:
https://developer.bigcommerce.com/stencil-docs/getting-started/installing-stencil
I've tried uninstalling stencil and reinstalling multiple times. I've also tried using a fresh clone of cornerstone multiple times in multiple different directories. I can't get rid of this error and have tried all of the troubleshooting suggestions from the docs. There are no errors in the terminal.
I'm on macOS High Sierra 10.13.6
Node Version: v.6.4.0
Any ideas on why I'm getting this error?
This is an issue on our end with the Cornerstone 3.1 release, which can be downloaded through GitHub but hasn't rolled out to production yet. We've got an engineering ticket in to address it, but in the meantime, you can roll back to the Cornerstone 3.0 release to bypass the error. Sorry for the trouble!