Nuxt 3 impossible to run dev - nuxtjs3

For some reason i cannot start a nuxt project.
you can find the error message i get when i do an "npm run dev" just after trying to install a new nuxt project :
Cannot read properties of undefined (reading 'modules')
at _sfc_main.setup (./node_modules/nuxt/dist/app/components/nuxt-root.vue:67:16)
at callWithErrorHandling (./node_modules/#vue/runtime-core/dist/runtime-core.cjs.js:157:22)
at setupStatefulComponent (./node_modules/#vue/runtime-core/dist/runtime-core.cjs.js:7107:29)
at setupComponent (./node_modules/#vue/runtime-core/dist/runtime-core.cjs.js:7062:11)
at renderComponentVNode (./node_modules/#vue/server-renderer/dist/server-renderer.cjs.js:172:17)
at renderToString (./node_modules/#vue/server-renderer/dist/server-renderer.cjs.js:446:26)
at Object.renderToString$1 [as renderToString] (./.nuxt/dev/index.mjs:472:24)
at Object.renderToString (./node_modules/vue-bundle-renderer/dist/runtime.mjs:173:40)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ./.nuxt/dev/index.mjs:521:21
I am on Mac 12.5 Monterey, node version v16.17.0, npm version 8.15.0
Did someone encounter the same problem?

Downgrading to RC8 in the meantime fixed the issue.
Or upgrade to RC10.

Related

Problem starting Next.js app at locallhost 7777 using yarn dev

When I try to run my localhost using yarn dev it shows this error:
yarn run v1.22.4 $ next -p 7777 ready - started server on
0.0.0.0:7777, url: http://localhost:7777 TypeError: _jestWorker.Worker is not a constructor
at Object.loadWebpackHook (D:\isc-web\isc-front\node_modules\next\dist\server\config-utils.js:67:20)
at Object.loadConfig [as default] (D:\isc-web\isc-front\node_modules\next\dist\server\config.js:332:29)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async NextServer.loadConfig (D:\isc-web\isc-front\node_modules\next\dist\server\next.js:112:22)
error Command failed with exit code 1. info Visit
https://yarnpkg.com/en/docs/cli/run for documentation about this
command.
It was all working fine before I did npm install --save-dev babel-plugin-styled-components even though I canceled the changes by using git checkout -- . but still got the same problem
If you cancelled dependency changes with git checkout your node_modules may still have the old dependencies installed. Try running npm i again to see if getting updated dependencies resolves the issue.
I can't tell much from this error message and I don't know how far along your project is... Have you seen the official Next.js + styled-components example? https://github.com/vercel/next.js/tree/canary/examples/with-styled-components
Perhaps if you try setting up the library this way instead?

TypeError: module.exports.v1 is not a constructor, error thrown from google-cloud/firestore when using firebase-admin sdk

Recently I encountered the above error (TypeError: module.exports.v1 is not a constructor) when trying to run firebase-firestore related tests. Earlier I had no issue running the tests but after doing a npm install was getting the above error.
The source of the error is from google-cloud/firestore which is required by firebase-admin.
Tried several options but it doesn't seems to get resolved. I then tried with an older node-module and it worked as expected.
The problem was due to the test framework I've been using. Once I changed from jest to mocha the problem got solved.
When I updated firebase admin sdk from 8.4.0 to higher then I had same error in running jest test code.
I fixed it to add --env node option for jest.
jest --env node
I hit this error when I left out an await on an async function. That caused my code to continue running after the jest environment had been torn down.
There was a message that said ReferenceError: You are trying to import a file after the Jest environment has been torn down. which should have been a tip that I was running async code and not waiting for completion.
We needed to upgrade node from v8.11.3 to v8.16.2.

How can I fix this 410 error response from Firebase hosting when deploying from Create React App? [duplicate]

this is my log :
[info] === Deploying to 'test-123'...
[info]
[info] i deploying hosting
[info] i hosting: preparing public directory for upload...
[debug] [2018-10-25T15:39:54.587Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/test-123/uploads/-LPfsRseOoTTgVVj-keR?fileCount=81&message=
Thu Oct 25 2018 21:09:54 GMT+0530 (India Standard Time)
[debug] [2018-10-25T15:40:00.337Z] <<< HTTP RESPONSE 410
[debug] [2018-10-25T15:40:00.337Z] <<< HTTP RESPONSE BODY undefined
[debug] [2018-10-25T15:40:00.339Z] TypeError: Cannot read property 'error' of undefined
at module.exports (C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\lib\responseToError.js:10:13)
at Request._callback (C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\lib\api.js:47:25)
at Request.self.callback (C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:1085:12)
at Object.onceWrapper (events.js:313:30)
[error]
[error] Error: An unexpected error has occurred.
till yesterday everything was fine
when i deploy functions one by one or all at the same time everything works fine
please suggest something if someone knows about it
it says HTTPS ERROR 410 which i googled and found out that means the resource has moved
so the url requested might not be working but when i put that in browser its working fine
and i upgraded node, all npm modules still no luck
I found this response from the firebase-community Slack group https://firebase-community.slack.com:
If you are receiving a 410 error, you will likely need to update your cli version (firebase-tools). Updating to the latest version should fix it. You will need to upgrade your CLI version to at least 4.1.0 (>= 5.1.1 is recommended).
I was using firebase-tools: version 3.18.4 previously, and after upgrading to the latest version (5.1.1), I was able to deploy successfully:
npm install -g firebase-tools#5.1.1
For me only installing specific version worked e.g npm install -g firebase-tools#5.1.1
Update global npm "firebase-tools"
Updating firebase tools with npm update -g firebase-tools fixed this for me. I also had to close my terminal session and open a new one to use the new cli version.
My problem was using nvm the version of firebase-tools was mixed, however this npx firebase deploy worked for me.
Credit goes to heydanhey here github issue
After updating firebase I also needed to run this command.
alias firebase="`npm config get prefix`/bin/firebase"
Upgrading the dependencies for the project may help
npm install --save firebase-functions#latest
This worked for me:
Upgrade firebase npm update -g firebase-tools
Log out firebase logout
Log back in firebase login
Deploy firebase deploy

Sails grunt watch - Warning: Cannot read property 'bigint' of undefined Use --force to continue

I run sails on current project, just copied current project to new macbook high sierra and suddenly shown this error when running task grunt and edit asset files.
Sails version: 1.0.2
Grunt-cli version: 1.2.0
Grunt version: 1.0.3
Npm vesion: 6.1.0
Running "watch" task
Waiting...
>> File "assets/styles/project/_colors.scss" changed.
Running "less:dev" (less) task
>> 1 stylesheet created.
Running "sass:dev" (sass) task
Running "sync:dev" (sync) task
**Warning: Cannot read property 'bigint' of undefined Use --force to continue.**
When i run trace for this problem will show this
Warning: Cannot read property 'bigint' of undefined Use --force to continue.
TypeError: Cannot read property 'bigint' of undefined
at Object.stat (fs.js:795:37)
at Object.stat (/Users/erwinsetiawan/Works/Project/review-portal/node_modules/sails-hook-grunt/node_modules/promised-io/promise.js:709:17)
at processPair (/Users/erwinsetiawan/Works/Project/review-portal/node_modules/sails-hook-grunt/node_modules/grunt-sync/tasks/sync.js:143:28)
at /Users/erwinsetiawan/Works/Project/review-portal/node_modules/sails-hook-grunt/node_modules/grunt-sync/tasks/sync.js:52:16
at Array.map (<anonymous>:null:null)
at Object.<anonymous> (/Users/erwinsetiawan/Works/Project/review-portal/node_modules/sails-hook-grunt/node_modules/grunt-sync/tasks/sync.js:37:38)
at Array.map (<anonymous>:null:null)
at Object.<anonymous> (/Users/erwinsetiawan/Works/Project/review-portal/node_modules/sails-hook-grunt/node_modules/grunt-sync/tasks/sync.js:29:28)
at Object.<anonymous> (/Users/erwinsetiawan/Works/Project/review-portal/node_modules/grunt/lib/grunt/task.js:252:15)
at Object.thisTask.fn (/Users/erwinsetiawan/Works/Project/review-portal/node_modules/grunt/lib/grunt/task.js:70:16)
at Object.<anonymous> (/Users/erwinsetiawan/Works/Project/review-portal/node_modules/grunt/lib/util/task.js:294:30)
at Task.runTaskFn (/Users/erwinsetiawan/Works/Project/review-portal/node_modules/grunt/lib/util/task.js:244:24)
at Task.<anonymous> (/Users/erwinsetiawan/Works/Project/review-portal/node_modules/grunt/lib/util/task.js:293:12)
at /Users/erwinsetiawan/Works/Project/review-portal/node_modules/grunt/lib/util/task.js:220:11
at process._tickCallback (internal/process/next_tick.js:61:11)
It nothing happen when run this project to another laptop old el capitan and windows
Anyone can help me to solve di problem?
This appears to be fixed in grunt-sync 0.8.0. I suggest updating the grunt-sync package.
This is now fixed in sails-hook-grunt#4.0.1 (see https://github.com/balderdashy/sails/issues/4470 for more information)
Downgrade from node 10.5.0 to node 10.4.1 fix this problem, so probably current grunt version not yet supported the newest node version.

Potential conflict between polymer build and tur-nr/polymer-redux

Description
I am experiencing unexpected errors when running polymer build after installing and using tur-nr/polymer-redux. Here is the demo repo.
Versions & Environment
polymer-build: v0.18.3 polymer --version
node: v6.10.2
Operating System: macOS Sierra v10.12.4
Steps to reproduce
terminal
git clone https://github.com/maria-le/redux # clone remote repo to your local
cd redux # cd into your local repo
bower install # install bower dependencies
npm install redux # install redux
polymer build # attempt build
Expected results
I expect the build to complete, without errors. Then allow me to serve the packaged build.
Actual results
I get the following errors in the terminal.
Error messages
src/all-locally.html(14,16) error [unknown-polymer-behavior] - Unable to resolve behavior store. Did you import it? Is it annotated with #polymerBehavior?
ReduxStore
src/imported-behavior.html(7,16) error [unknown-polymer-behavior] - Unable to resolve behavior ReduxStore. Did you import it? Is it annotated with #polymerBehavior?
polymerStore
src/imported-store-as-variable.html(10,16) error [unknown-polymer-behavior] - Unable to resolve behavior polymerStore. Did you import it? Is it annotated with #polymerBehavior?
PolymerRedux(reduxStore)
src/imported-store.html(7,16) warning [could-not-determine-behavior-name] - Could not determine behavior name from expression of type
CallExpression
error: Promise rejection: Error: 3 error(s) occurred during build.
error: Error: 3 error(s) occurred during build.
at BuildAnalyzer._done (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/lib/analyzer.js:229:36)
at BuildAnalyzer. (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/lib/analyzer.js:189:26)
at next (native)
at fulfilled (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/lib/analyzer.js:17:58)
at process._tickCallback (internal/process/next_tick.js:109:7)
References
How to use polymer-redux with polymer-build?
polymer lint and polymer-build fail due to ReduxBehavior not registering properly
#polymerBehavior should still produce a behavior even if we can't evaluate the expression

Resources