PS D:\React Prep\E-com> npm start
ecom#0.1.0 start
react-scripts start
Failed to compile.
createSchemaValidation is not defined
error showing while npm start..
Related
In every new project after npm install this error occur when i run the project
Error: multi (webpack)-dev-server/client?http://0.0.0.0:0&sockPath=/sockjs-node ./node_modules/#angular/material/prebuilt-themes/indigo-pink.css ./node_modules/bootstrap/dist/css/bootstrap.min.css ./src/styles.scss ../node_modules/font-awesome/css/font-awesome.css
Module not found: Error: Can't resolve 'E:\subha jha\subha useful\slfr\node_modules\font-awesome\css\font-awesome.css' in 'E:\subha jha\subha useful\slfr\lokfr-repo'
After bumping the node version on my Firebase project from node 10 to node 14 in my package.json, like so:
...
"engines": {
"node": "14"
},
...
Firebase throws an error whenever I try to deploy a function.
First, I run:
firebase deploy --only functions:foo
Afterwards, the console shows:
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
> lint
> gts lint
version: 14
Running command: npm --prefix "$RESOURCE_DIR" run build
> build
> ttsc
✔ functions: Finished running predeploy script.
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
✔ functions: required API cloudbuild.googleapis.com is enabled
✔ functions: required API cloudfunctions.googleapis.com is enabled
i functions: preparing functions directory for uploading...
i functions: packaged functions (257.54 KB) for uploading
i pubsub: ensuring required API pubsub.googleapis.com is enabled...
i scheduler: ensuring required API cloudscheduler.googleapis.com is enabled...
✔ pubsub: required API pubsub.googleapis.com is enabled
✔ scheduler: required API cloudscheduler.googleapis.com is enabled
✔ functions: functions folder uploaded successfully
i functions: updating Node.js 14 function foo(us-central1)...
✔ functions[foo(us-central1)]: Successful upsert schedule operation.
Functions deploy had errors with the following functions:
foo(us-central1)
To try redeploying those functions, run:
firebase deploy --only "functions:foo"
To continue deploying other features (such as database), run:
firebase deploy --except functions
Error: Functions did not deploy properly.
Unfortunately, there's not much logs that I can get from the error:
By running:
firebase deploy --only functions:foo
I get the following error logs:
{"code":3,"message":"Build failed: > sharp#0.28.3 install /workspace/node_modules/sharp\n> (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)\n\nsharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linux-x64.tar.br\n\n> protobufjs#6.10.2 postinstall /workspace/node_modules/protobufjs\n> node scripts/postinstall\n\n\n> functions#undefined prepare /workspace\n> npm run compile\n\n\n> functions# compile /workspace\n> ttsc\n\nsh: 1: ttsc: not found\nnpm ERR! code ELIFECYCLE\nnpm ERR! syscall spawn\nnpm ERR! file sh\nnpm ERR! errno ENOENT\nnpm ERR! functions# compile: ttsc\nnpm ERR! spawn ENOENT\nnpm ERR! \nnpm ERR! Failed at the functions# compile script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /builder/home/.npm/_cacache/_logs/2021-06-06T04_27_25_637Z-debug.log\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 1\nnpm ERR! functions#undefined prepare: npm run compile\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the functions#undefined prepare script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /builder/home/.npm/_logs/2021-06-06T04_27_25_673Z-debug.log; Error ID: beaf8772"}
In addition, my node version is:
node --version
v14.17.0
After looking at the Cloud Build from the Google Cloud Console, I've noticed that the following error:
2021-06-07T03:28:00.714478581ZStep #4 - "builder": src/cloud_functions/userInfo/https/onCall/uploadAvatar.ts(4,19): error TS7016: Could not find a declaration file for module 'sharp'. '/workspace/node_modules/sharp/lib/index.js' implicitly has an 'any' type.
To fix this, I simply added the following code in the tsconfig.json:
{
"compilerOptions": {
"noImplicitAny": false,
...
},
...
}
I'm trying to build my first localised SPFX WebPart for Sharepoint Online. I've added an additional language de-de.js in the loc folder and now I'm trying to change the write-manifest.json to use my new language on debug by adding the `"debugLocale" property to it:
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json",
"cdnBasePath": "<!-- PATH TO CDN -->",
"debugLocale": "de-de"
}
Checking the official instructions of Microsoft and inspecting the JSON sheme of the write-manifest.json shows this should compile, but when I gulp serve it returns:
Build target: DEBUG
./node_modules/#microsoft/node-core-library/lib/JsonSchema.js:178
throw new Error(prefix + os.EOL +
^
Error: JSON validation failed:
./config/write-manifests.json
Error: #/ (Defines configuration options for the...)
Additional properties not allowed: debugLocale
at validateObjectWithCallback (./node_modules/#microsoft/node-core-library/lib/JsonSchema.js:178:19)
at JsonSchema.validateObjectWithCallback (./node_modules/#microsoft/node-core-library/lib/JsonSchema.js:193:13)
at JsonSchema.validateObject (./node_modules/#microsoft/node-core-library/lib/JsonSchema.js:175:14)
at WriteManifestsTask._readConfigFile (./node_modules/#microsoft/gulp-core-build/lib/tasks/GulpTask.js:311:28)
at WriteManifestsTask.onRegister (./node_modules/#microsoft/gulp-core-build/lib/tasks/GulpTask.js:87:32)
at Object.initialize (./node_modules/#microsoft/gulp-core-build/lib/index.js:299:24)
at SPWebBuildRig.initialize (./node_modules/#microsoft/sp-build-common/lib/BuildRig.js:61:19)
at SPWebBuildRig.initialize (./node_modules/#microsoft/sp-build-common/lib/SPBuildRig.js:29:15)
at SPWebBuildRig.initialize (./node_modules/#microsoft/sp-build-web/lib/SPWebBuildRig.js:15:15)
at Object.exports.initialize (./node_modules/#microsoft/sp-build-web/lib/index.js:23:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hello-world#0.0.1 start: `gulp serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hello-world#0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! ~/.npm/_logs/2019-01-09T16_43_53_070Z-debug.log
How can I solve this issue?
Between 1.5 and 1.6, the build tasks appeared to have changed. I have confirmed the issue with 1.6+.
If you modify your write-manfiest.json "debugLocale" to "buildSingleLocale", everything will work as expected. I think the docs and the schema may be out of date.
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json",
"cdnBasePath": "<!-- PATH TO CDN -->",
"buildSingleLocale": "de-de"
}
I just tried that and it works in my setup.
Created webpart using yo #microsoft/sharepoint with default options (using React as Javascript framework)
Added de-de.js file to loc folder and changed values so I can see that is really grabs the correct file
Added "debugLocale": "de-de" to write-manifests.json
Run gulp serve
Texts used are from de-de.js
My versions:
yo - 2.0.3
#microsoft/sharepoint generator - 1.4.1 (I know it is old one)
npm - 5.6.0 (Yes, also old one)
But, once I update the #microsoft/sharepoint generator to latest version 1.7.1 it stopped working. It seems that the issue occurs since version 1.6.0
Workaround is to run it with --locale parameter like gulp serve --locale=de-de or to use older version:
npm uninstall #microsoft/generator-sharepoint -g
npm install #microsoft/generator-sharepoint#1.5.1 -g
Until I started the new polymer-cli my projects done in Polymer 1 was running as expected. Now, when I tried to start them via gulp serve I get error.
I tried updated by "bower update" and I got
bower polymer#1.11.3 ENOENT ENOENT: no such file or directory, lstat 'C:\Users\my-user\AppData\Local\Temp\tmp-28649quOp0xfcp3e\polymer-1.11.3'
Stack trace:
C:\Users\my-user\AppData\Roaming\npm\node_modules\bower\lib\node_modules\fstream\lib\dir-reader.js:96:25
C:\Users\my-user\AppData\Roaming\npm\node_modules\bower\lib\node_modules\graceful-fs\polyfills.js:284:29
FSReqWrap.oncomplete (fs.js:152:21)
Console trace:
Error
at StandardRenderer.error (C:\Users\my-user\AppData\Roaming\npm\node_modules\bower\lib\renderers\StandardRenderer.js:88:37)
at Logger.<anonymous> (C:\Users\my-user\AppData\Roaming\npm\node_modules\bower\lib\bin\bower.js:113:30)
at emitOne (events.js:116:13)
at Logger.emit (events.js:211:7)
at Logger.emit (C:\Users\my-user\AppData\Roaming\npm\node_modules\bower\lib\node_modules\bower-logger\lib\Logger.js:29:39)
at C:\Users\my-user\AppData\Roaming\npm\node_modules\bower\lib\commands\index.js:49:24
at _rejected (C:\Users\my-user\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:864:24)
at C:\Users\my-user\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:890:30
at Promise.when (C:\Users\my-user\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:1142:31)
at Promise.promise.promiseDispatch (C:\Users\my-user\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:808:41)
System info:
Bower version: 1.8.4
Node version: 8.11.1
OS: Windows_NT 6.1.7601 x64
Could that be related to the fact I installed "npm install -g polymer-cli#next"? What could I check around?
I am testing NetLify CMS for a project, but I am not able to work in my local environment, because gulp server crashs before it start, due to the error below:
$ npm start
> victor-hugo#1.0.0 start C:\Users\maufa\Documents\web-development\kaldi-hugo-cms-template
> gulp server
[14:17:07] Requiring external module babel-register
[14:17:08] Using gulpfile ~\Documents\web-development\kaldi-hugo-cms-template\gulpfile.babel.js
[14:17:08] Starting 'hugo'...
[14:17:08] Starting 'css'...
[14:17:09] Starting 'js'...
[14:17:09] Starting 'svg'...
[14:17:09] Starting 'cms'...
[14:17:09] Finished 'cms' after 150 ms
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn ./bin/hugo.win32 ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! victor-hugo#1.0.0 start: `gulp server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the victor-hugo#1.0.0 start script 'gulp server'.
So, looks like it is trying to find hugo.win32 inside the bin folder.
However, inside this folder I ave:
hugo.darwin
hugo.exe
hugo.linux
Any clue?
It looks like this issue is particular to the Kaldi Hugo template. I installed on Windows and got the same error, then I tried renaming hugo.exe to hugo.win32, and it worked. I found the error in gulpfile.babel.js (incorrect string identifier for Windows), and submitted a PR. If you don't want to wait for the merge, feel free to change your version directly: https://github.com/netlify-templates/kaldi-hugo-cms-template/pull/3/files