I'm having trouble with installing typings. I have the following line at the top of boot.ts:
///<reference path="./../typings/browser/ambient/es6-shim/index.d.ts"/>
However, That typing is not installed in node_modules:
I have the typings.json file with the following:
{
"ambientDependencies": {
"es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654",
"jasmine": "registry:dt/jasmine#2.2.0+20160412134438",
"node": "registry:dt/node#4.0.0+20160509154515"
}
}
From all the Google'ing, I should be able to run "typings install" to install it. But, I'm just not seeing it. When I run that command, all I see is:
What am I missing/doing incorrectly?
Finally found my answer here: Attempted to compile "zone.js" as an external module, but it looks like a global module
Summary from the above link:
Basically, the newest Typings install has new changes.
In typings.json file change "ambientDependencies" to "globalDependencies"
All the typings are saved/stored in /typings folder in the root of your project, not "node_modules" (where I was looking). Reference them accordingly
Related
How can I solve this warning when creating laravel project?
1 WARNING in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
Steps to replicate:
composer create-project --prefer-dist laravel/laravel example
cd example
composer require laravel/ui
php artisan ui vue --auth
npm install vue#next vue-router#next vue-loader#next
npm install
npm run dev
EDIT
From this solution, add these lines to webpack.mix.js
mix.webpackConfig({
stats: {
children: true,
},
});
The above solution creates another warning:
WARNING in ./resources/sass/app.scss (./node_modules/css-loader/dist/cjs.js??clonedRuleSet-6.use1!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-6.use[2]!./node_modules/resolve-url-loader/index.js??clonedRuleSet-6.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-6.use[4]!./resources/sass/app.scss)
Module Warning (from ./node_modules/postcss-loader/dist/cjs.js):
Warning
(2423:3) autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
Child mini-css-extract-plugin C:\xampp\htdocs\lva\node_modules\css-loader\dist\cjs.js??clonedRuleSet-6.use1!C:\xampp\htdocs\lva\node_modules\postcss-loader\dist\cjs.js??clonedRuleSet-6.use[2]!C:\xampp\htdocs\lva\node_modules\resolve-url-loader\index.js??clonedRuleSet-6.use[3]!C:\xampp\htdocs\lva\node_modules\sass-loader\dist\cjs.js??clonedRuleSet-6.use[4]!C:\xampp\htdocs\lva\resources\sass\app.scss compiled with 1 warning
webpack compiled with 1 warning
How can I solve this?
The color-adjust shorthand is currently deprecated and it depends on the autoprefixer#10.4.6 (source).
I was able to fix this by reverting the autoprefixer package as well as #Benno to version 10.4.5. Run this:
npm install autoprefixer#10.4.5 --save-exact
You probably updated your npm packages. I was able to fix this by reverting the autoprefixer package to version 10.4.5 in the package-lock.json.
when you have problem with autoprefixer maybe because your version autoprefixer. you can add version autoprefixer based problem this version autoprefixer . i have problem on "print-color-adjust" and i add code on my package.json for change my autoprefixer become version "10.4.5"
when you use npm
"overrides": {
"autoprefixer": "10.4.5"
},
Or, when you use yarn
"resolutions": {
"autoprefixer": "10.4.5"
},
Don't forget to delete your package-lock and node_modules , then npm install again.
it work for me (react-bootstrap.v.5)
If you don't want to add additional packages to solve this error, then try this:
Capitalize all the files and Directory name in your components folder
Or you can run this command to install a package if the above solution doesn't work.
npm install autoprefixer#10.4.5 --save-exact
I'm using React with InertiaJS and Laravel as backend, this solution worked in my case.
Thanks
I have the same problem, whenever I hit save an annoying pop-up of error code comes. The simple solution is to add the following code to your webpack.mixjs file :
mix.webpackConfig({
stats: {
children: true,
},});
stop the npm run watch
add a package autoprefixer, add below in terminal:
npm install autoprefixer#10.4.5 --save-exact
run npm run watch and it will not give the error again.
I solved this issue within Laravel by changing the file ./node_modules/bootstrap/scss/forms/_form-check.scss
Line 28 part of the .form-check-input style
change color-adjust: exact; // Keep themed appearance for print
to print-color-adjust: exact; // Keep themed appearance for print
We tried updating react-scripts from 4.0.3 to 5.0.0 with react-data-export 0.6.0 and xlsx 0.17.2, and when we try to build it fails with the error Module not found: Error: Can't resolve 'fs' in react-data-export\node_modules\tempa-xlsx
What fix needs to be applied to maintain react-scripts version 5.0.0?
I am using react-scripts and not webpack. Thanks!
Try adding this in node_modules\react-data-export\node_modules\tempa-xlsx\package.json
"browser": {
"fs": false,
"path": false,
"os": false
}
Worked with me.
Edit:
I just found out that I can't create Excel files anymore. After some research, it seems that 'fs' (which is used to interact with file system) was removed from react-scripts 5. So the only solution is to either use react-scripts 4.0.3, or use another Excel library.
Although adding "fs":false is a temporary fix, you might not be able to export excel files altogether. This package is not being maintained anymore. I would suggest go for react-export-excel
I am very new to unit testing and have been trying to use codeception to do it. So I have followed the following guidelines link
and installed it using composer: composer require "codeception/codeception" --dev, it was successful, but when I tried to set it up using composer exec codecept bootstrap I got the following error:
Script codecept handling the __exec_command event returned with error
code 255
Anyone knows how to fix it?
Just FYI, I have pulled the whole project from a repo that already has the tests/unit folder with previous tests already.
My composer.json file has the following
"require": {
"codeception/robo-paracept": "dev-master",
},
"require-dev": {
"codeception/codeception": "2.6.x-dev",
Apparently the issue was with the php version that I was using. I am using 7.3; using 7.2 solved my problem and the whole thing went smoothly.
Run the command with the -v option to show verbose output.
In my case there where unallowed tabs in my tests/functional.suite.yml file.
I replaced them with 4 spaces and everything was fine.
I tried to build the project in android using nativescript. It throw
the error like this more than one library with package name
'com.google.android.gms.license'.
package.json
"tns-android": {
"version": "3.3.1"
}
"nativescript-onesignal": "^1.0.7",
"nativescript-push-notifications": "0.0.19",
App.gradle
dependencies {
compile 'com.onesignal:OneSignal:3.+#aar'
compile 'com.google.android.gms:play-services-gcm:+'
compile 'com.google.android.gms:play-services-location:+'
compile "com.android.support:multidex:1.0.0"
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.code.gson:gson:2.2.4' }
How to resolve the issue?
Delete node_modules and hooks folders from project and platform.
re-install them "npm install" and then try "tns platform remove android"
"tns platform add android#3.4"
Remove node_modules folder.
1.npm install tns-core-modules#latest --save
2.uinstall & update tns version/(npm install -g nativescript )
3.update node/npm
4.npm cache clean -f
By using this comments i resolved the issues
Recently, due to a problem, I had reinstall all my libraries which included CoffeeScript also. My problem is that my team has one version of CoffeeScript while I have a newer one. So every time we push code there is conflict in javascript. Any pointers on how I can downgrade CoffeeScript version in MAC OS would be really helpful.
Operation System: OS X El Capitan installed.
If you used NPM, install the older version of CoffeeScript with the following command:
npm install -g coffee-script#1.11.1
Close and reopen your terminal.
Check if you have the correct version installed:
coffee -v
On a side note, it might be better to maintain your project dependencies with package.json. That way, your team will always be in sync with the relevant package versions.
{
"name": "coffee-app",
"version": "1.0.0",
"main": "index.coffee",
"scripts": {
"start": "./node_modules/.bin/coffee index.coffee"
},
"dependencies": {
"coffee-script": "^1.11.1"
}
}
Just run npm install to install project dependencies.
And run npm start to start app with the correct "coffee version" for your app.