I am trying to use fullcalender.js but it is showing error
at getMomentLocaleData (rzymek_fullcalendar.js? hash=d3abc7a76bbff89adf40aebd738c6d56c5cf0659:2586)
at locale (rzymek_fullcalendar.js? hash=d3abc7a76bbff89adf40aebd738c6d56c5cf0659:2477)
at Object.defineProperty.value (rzymek_fullcalendar.js? hash=d3abc7a76bbff89adf40aebd738c6d56c5cf0659:2591)
at __webpack_require__ (rzymek_fullcalendar.js? hash=d3abc7a76bbff89adf40aebd738c6d56c5cf0659:62)
at Object.defineProperty.value (rzymek_fullcalendar.js?hash=d3abc7a76bbff89adf40aebd738c6d56c5cf0659:12531)
at __webpack_require__ (rzymek_fullcalendar.js? hash=d3abc7a76bbff89adf40aebd738c6d56c5cf0659:62)
at Object.defineProperty.value (rzymek_fullcalendar.js? hash=d3abc7a76bbff89adf40aebd738c6d56c5cf0659:7399)
at __webpack_require__ (rzymek_fullcalendar.js? hash=d3abc7a76bbff89adf40aebd738c6d56c5cf0659:62)
at Object.defineProperty.value (rzymek_fullcalendar.js?hash=d3abc7a76bbff89adf40aebd738c6d56c5cf0659:12141) hash=d3abc7a76bbff89adf40aebd738c6d56c5cf0659:62)
I have added packages jQuery and moment from atmospherejs.But still error in momentlocaleData function
Related
I need help with this one:
Call Stack
options.factory
file:///C:/Users/tirfa/Projects/nluz-blog/.next/static/chunks/webpack.js (722:31)
__webpack_require__
/_next/static/chunks/webpack.js (37:33)
fn
file:///C:/Users/tirfa/Projects/nluz-blog/.next/static/chunks/webpack.js (377:21)
eval
node_modules\next\dist\compiled\react\cjs\react-jsx-dev-runtime.development.js (17:12)
eval
node_modules\next\dist\compiled\react\cjs\react-jsx-dev-runtime.development.js (1328:3)
./node_modules/next/dist/compiled/react/cjs/react-jsx-dev-runtime.development.js
file:///C:/Users/tirfa/Projects/nluz-blog/.next/static/chunks/app/studio/[[...index]]/page.js (5098:1)
options.factory
/_next/static/chunks/webpack.js (722:31)
__webpack_require__
file:///C:/Users/tirfa/Projects/nluz-blog/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (377:21)
eval
node_modules\next\dist\compiled\react\jsx-dev-runtime.js (6:2)
./node_modules/next/dist/compiled/react/jsx-dev-runtime.js
file:///C:/Users/tirfa/Projects/nluz-blog/.next/static/chunks/app/studio/[[...index]]/page.js (5120:1)
options.factory
/_next/static/chunks/webpack.js (722:31)
__webpack_require__
file:///C:/Users/tirfa/Projects/nluz-blog/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (377:21)
eval
webpack-internal:///./app/studio/[[...index]]/page.tsx (5:79)
./app/studio/[[...index]]/page.tsx
file:///C:/Users/tirfa/Projects/nluz-blog/.next/static/chunks/app/studio/[[...index]]/page.js (5001:1)
options.factory
/_next/static/chunks/webpack.js (722:31)
__webpack_require__
file:///C:/Users/tirfa/Projects/nluz-blog/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (377:21)
__webpack_require__
node_modules\next\dist\client\app-index.js (26:16)
eval
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (106:0)
I expected the studio. But this happens.
Install the following package, the problem may be solved
npm i webpack
I also encountered this error today and realised I had updated to the latest version of next. This appears to be an error in next version 13.0.7.
I fixed this error by downgrading back to 13.0.6
npm i next#13.0.6
I'm trying to create a brand new project using NextJS 13 to try out the new "app" folder approach. I use the following commands.
npx create-next-app#latest --experimental-app
npm run dev
With no other changes whatsoever, I get the error below shown in the browser when I try to browse to localhost:3000.
Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'call')
Call Stack
options.factory
file:///D:/Projects/Personal/leeconlin-website/.next/static/chunks/webpack.js (710:31)
__webpack_require__
/_next/static/chunks/webpack.js (37:33)
fn
file:///D:/Projects/Personal/leeconlin-website/.next/static/chunks/webpack.js (365:21)
require
node_modules\next\dist\client\image.js (7:15)
./node_modules/next/dist/client/image.js
file:///D:/Projects/Personal/leeconlin-website/.next/static/chunks/app/page.js (39:1)
options.factory
/_next/static/chunks/webpack.js (710:31)
__webpack_require__
file:///D:/Projects/Personal/leeconlin-website/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (365:21)
__webpack_require__
node_modules\next\dist\client\app-index.js (26:16)
requireModule
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (142:0)
initializeModuleChunk
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (427:0)
readChunk
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (252:0)
mountLazyComponent
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (23079:0)
beginWork
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (24792:0)
beginWork$1
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (32185:0)
performUnitOfWork
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (31082:0)
workLoopConcurrent
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (31068:0)
renderRootConcurrent
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (31026:0)
performConcurrentWorkOnRoot
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (29983:0)
workLoop
node_modules\next\dist\compiled\scheduler\index.js (10:3921)
flushWork
node_modules\next\dist\compiled\scheduler\index.js (10:3629)
MessagePort.performWorkUntilDeadline
node_modules\next\dist\compiled\scheduler\index.js (10:1811)
What am I missing?
The current solution is to use next.js 13.0.6, cause there's something wrong with 13.0.7.
"dependencies": {
"#next/font": "13.0.6",
"#types/node": "18.11.17",
"#types/react": "18.0.26",
"#types/react-dom": "18.0.9",
"eslint": "8.30.0",
"eslint-config-next": "13.0.6",
"next": "13.0.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
}
if you still have an error, please delete your .next folder and node_modules folder, run npm i and try again.
I found the solution here:
TypeError: Cannot read properties of undefined (reading 'call') on Next.js
I have an VueJs app with firebase integrated and I am trying to use Mocha to test my components. The tests will pass when firebase is not a dependency in the component. When I bring in firebase I get the following error when running the unit tests.
$ vue-cli-service test:unit
WEBPACK Compiling...
DONE Compiled successfully in 1916ms
WEBPACK Compiled successfully in 1916ms
MOCHA Testing...
RUNTIME EXCEPTION Exception occurred while loading your tests
ReferenceError: IDBIndex is not defined
at Module../node_modules/idb/lib/idb.mjs (....myapp-web/dist/webpack:/node_modules/idb/lib/idb.mjs:87:1)
at __webpack_require__ (....myapp-web/dist/webpack:/webpack/bootstrap:19:1)
at Module../node_modules/#firebase/installations/dist/index.esm.js (....myapp-web/dist/webpack:/node_modules/#firebase/installations/dist/index.esm.js:1:1)
at __webpack_require__ (....myapp-web/dist/webpack:/webpack/bootstrap:19:1)
at Module../node_modules/#firebase/performance/dist/index.esm.js (....myapp-web/dist/webpack:/node_modules/#firebase/performance/dist/index.esm.js:1:1)
at __webpack_require__ (....myapp-web/dist/webpack:/webpack/bootstrap:19:1)
at Module../node_modules/firebase/dist/index.esm.js (....myapp-web/dist/webpack:/node_modules/firebase/dist/index.esm.js:1:1)
at __webpack_require__ (....myapp-web/dist/webpack:/webpack/bootstrap:19:1)
at Module../src/firebaseConfig.js (....myapp-web/dist/webpack:/src/firebaseConfig.js:1:1)
at __webpack_require__ (....myapp-web/dist/webpack:/webpack/bootstrap:19:1)
at Module../tests/unit/loginTest.spec.js (....myapp-web/dist/webpack:/tests/unit/loginTest.spec.js:5:1)
at __webpack_require__ (....myapp-web/dist/webpack:/webpack/bootstrap:19:1)
at run (....myapp-web/dist/webpack:/node_modules/mocha-webpack/lib/entry.js:3:1)
at Array.forEach (<anonymous>)
at Object../node_modules/mocha-webpack/lib/entry.js (....myapp-web/dist/webpack:/node_modules/mocha-webpack/lib/entry.js:10:1)
at __webpack_require__ (....myapp-web/dist/webpack:/webpack/bootstrap:19:1)
at ....myapp-web/dist/webpack:/webpack/bootstrap:83:1
at Object.<anonymous> (....myapp-web/dist/main.js:87:10)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object._module2.default._extensions.<computed> [as .js] (....myapp-web/node_modules/mocha-webpack/lib/util/registerRequireHook.js:148:12)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at ....myapp-web/node_modules/mocha/lib/mocha.js:334:36
at Array.forEach (<anonymous>)
at Mocha.loadFiles (....myapp-web/node_modules/mocha/lib/mocha.js:331:14)
at Mocha.run (....myapp-web/node_modules/mocha/lib/mocha.js:811:10)
at ....myapp-web/node_modules/mocha-webpack/lib/runner/TestRunner.js:191:27
at ....myapp-web/node_modules/mocha-webpack/lib/webpack/compiler/registerReadyCallback.js:26:7
at AsyncSeriesHook.eval [as callAsync] (eval at create (....myapp-web/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:36:1)
at AsyncSeriesHook.lazyCompileHook (....myapp-web/node_modules/tapable/lib/Hook.js:154:20)
at ....myapp-web/node_modules/webpack/lib/Compiler.js:304:22
at Compiler.emitRecords (....myapp-web/node_modules/webpack/lib/Compiler.js:489:39)
at ....myapp-web/node_modules/webpack/lib/Compiler.js:298:10
at ....myapp-web/node_modules/webpack/lib/Compiler.js:475:14
at eval (eval at create (....myapp-web/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
at callback (....myapp-web/node_modules/copy-webpack-plugin/dist/index.js:126:17)
at afterEmit (....myapp-web/node_modules/copy-webpack-plugin/dist/index.js:220:13)
at AsyncSeriesHook.eval [as callAsync] (eval at create (....myapp-web/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
at AsyncSeriesHook.lazyCompileHook (....myapp-web/node_modules/tapable/lib/Hook.js:154:20)
at ....myapp-web/node_modules/webpack/lib/Compiler.js:472:27
at ....myapp-web/node_modules/neo-async/async.js:2818:7
at done (....myapp-web/node_modules/neo-async/async.js:3522:9)
at AsyncSeriesHook.eval [as callAsync] (eval at create (....myapp-web/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at ....myapp-web/node_modules/webpack/lib/Compiler.js:454:33
at MemoryFileSystem.writeFile (....myapp-web/node_modules/memory-fs/lib/MemoryFileSystem.js:328:9)
at writeOut (....myapp-web/node_modules/webpack/lib/Compiler.js:452:30)
at ....myapp-web/node_modules/webpack/lib/Compiler.js:466:7
at objectIteratorWithKey (....myapp-web/node_modules/neo-async/async.js:3509:9)
at timesSync (....myapp-web/node_modules/neo-async/async.js:2297:7)
at Object.eachLimit (....myapp-web/node_modules/neo-async/async.js:3463:5)
at emitFiles (....myapp-web/node_modules/webpack/lib/Compiler.js:358:13)
at Immediate._onImmediate (....myapp-web/node_modules/memory-fs/lib/MemoryFileSystem.js:288:4)
at processImmediate (internal/timers.js:439:21)
ERROR mocha-webpack exited with code 1.
Total task duration: 3.9s
loginTest.spec.js
import { expect } from 'chai';
import { shallowMount } from '#vue/test-utils';
import sinon from 'sinon';
import Login from '../../src/components/Login';
const fb = require('../../src/firebaseConfig');
describe('Login.vue', () => {
it('Expect login email field to have default value.', () => {
const wrapper = shallowMount(Login);
sinon.stub(fb.auth(), 'signInWithEmailAndPassword', () => {});
expect(wrapper.find('#email1').text())
.to()
.be('you#email.com');
});
});
I have tried a number of different solutions to modifying the vue.config.js file to changing some node module configurations based on others suggestions but still no luck. Please let me know if I need to provide any other feedback or files for clarification.
Thank you in advanced for your help. Hopefully it's something simple and I just made a silly mistake.
While writing a plugin that injects code from another file ... another file is transformed and injected into the AST of the original file
astB = babel.transformFileSync(templatename, { plugins:plugins, code:false});
after that, calling:
generate(ast, { sourceMaps: true, retainLines: false, quotes:"'"}, codes);
causes error
Error: Invalid mapping: {"generated":{"line":30,"column":0},"original":{"line":1,"column":0}}
at SourceMapGenerator_validateMapping [as _validateMapping] (node_modules\babel-generator\node_modules\source-map\lib\source-map-generator.js:289:13)
at SourceMapGenerator_addMapping [as addMapping] (node_modules\babel-generator\node_modules\source-map\lib\source-map-generator.js:101:12)
at Array.forEach (<anonymous>)
at SourceMap.get (node_modules\babel-generator\lib\source-map.js:49:25)
at Object.get [as map] (node_modules\babel-generator\lib\buffer.js:53:33)
at writeAst (test2.js:59:24)
at Object.<anonymous> (test2.js:55:1)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
It is not very obvious from the error, but the problem is that injected code called parser as part of the transformation, and did not provide file name.
changing the line with transform fixes the issue
adding parserOpts:{sourceFilename: templatename} the code becomes:
astB = babel.transformFileSync(templatename, {parserOpts:{sourceFilename: templatename}, plugins:plugins, code:false});
After running grunt karma, getting below error, the only change which I made, was upgrading the node packages.
"grunt-contrib-jasmine": "~0.8.2",
"karma": "~0.12.36",
"karma-chrome-launcher": "~0.1.12",
"karma-firefox-launcher": "~0.1.6",
"karma-jasmine": "~0.3.5",
"karma-phantomjs-launcher": "^0.2.0",
Error which I am getting after running Grunt Karma.
Loading "jasmine.js" tasks...ERROR
>> TypeError: Cannot read property '_' of undefined
Loading "jsdoc-plugin.js" tasks...ERROR
>> TypeError: Cannot read property '_' of undefined
Loading "grunt-karma.js" tasks...ERROR
>> TypeError: Cannot read property '_' of undefined
Loading "notify.js" tasks...ERROR
>> TypeError: Cannot read property '_' of undefined
Loading "notify_hooks.js" tasks...ERROR
>> TypeError: Cannot read property 'hooker' of undefined
Loading "open.js" tasks...ERROR
>> TypeError: Cannot read property '_' of undefined
Loading "shell.js" tasks...ERROR
>> TypeError: Cannot read property '_' of undefined
Loading "uncss.js" tasks...ERROR
>> TypeError: Cannot read property '_' of undefined
Loading "usemin.js" tasks...ERROR
>> TypeError: Cannot read property '_' of undefined
Loading "GruntFile.js" tasks...ERROR
>> TypeError: Cannot read property '_' of undefined
Warning: Cannot read property 'name' of undefined Use --force to continue.
TypeError: Cannot read property 'name' of undefined
at Object.<anonymous> (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt/task.js:224:24)
at Object.<anonymous> (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/util/task.js:301:30)
at Task.runTaskFn (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/util/task.js:251:24)
at Task.<anonymous> (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/util/task.js:300:12)
at Task.start (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/util/task.js:309:5)
at Object.grunt.tasks (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt.js:164:8)
at Object.module.exports [as cli] (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt/cli.js:38:9)
at Object.<anonymous> (/usr/local/lib/node_modules/grunt-cli/bin/grunt:45:20)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
Aborted due to warnings.
Fatal error: Cannot read property 'exit' of undefined
TypeError: Cannot read property 'exit' of undefined
at Object.fail.warn (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt/fail.js:73:15)
at Object.task.options.error (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt.js:137:12)
at Task.<anonymous> (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/util/task.js:221:29)
at Task.runTaskFn (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/util/task.js:257:7)
at Task.<anonymous> (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/util/task.js:300:12)
at Task.start (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/util/task.js:309:5)
at Object.grunt.tasks (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt.js:164:8)
at Object.module.exports [as cli] (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt/cli.js:38:9)
at Object.<anonymous> (/usr/local/lib/node_modules/grunt-cli/bin/grunt:45:20)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt/fail.js:57
grunt.util.exit(typeof errcode === 'number' ? errcode : fail.code.FATAL_ERRO
^
TypeError: Cannot read property 'exit' of undefined
at Object.fail.fatal (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt/fail.js:57:13)
at process.uncaughtHandler (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt.js:130:10)
at process.emit (events.js:107:17)
at process._fatalException (node.js:236:26)
at Task.runTaskFn (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/util/task.js:257:7)
at Task.<anonymous> (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/util/task.js:300:12)
at Task.start (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/util/task.js:309:5)
at Object.grunt.tasks (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt.js:164:8)
at Object.module.exports [as cli] (/Users/marif/Dev/JavaScript/JavaScript-Boilerplate/node_modules/grunt/lib/grunt/cli.js:38:9)
at Object.<anonymous> (/usr/local/lib/node_modules/grunt-cli/bin/grunt:45:20)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
Hope to get some pointers to resolve the same.
P.S. It's been running fine if I use karma using 'karma start test/karma.conf.js' from the terminal. But I have been trying to kick off karma through grunt-karma task as well and that's where it's failing.